Giter VIP home page Giter VIP logo

yoloface's People

Contributors

elyha7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

yoloface's Issues

ONNX converting

Hello, mate @elyha7 .
I'm trying to convert face detector to onnx via your "export.py" file and have some issue:
after convertion output sizes don't fit with output sizes from loaded model ("model = YoloDetector( ... )")

yolo output
netron_model_output
Is it ok? And I'm confused, which postprocessing I need to do with these outputs? Any ideas?
P.S. thx a lot for your repo))

How To

Hi,
I can not use your Repo for inference.

I have 'cloned' your repo, 'cd' to it, then installed dependencies which has been mentioned in 'requirements.txt'
and then used

from yoloface import YoloDetector
import numpy as np
from PIL import Image

model = YoloFace(target_size=720,gpu=0,min_face=90)
orgimg = np.array(Image.open('test_image.jpg'))
bboxes,points = model.predict(orgimg)

But it returns that yoloface is not installed!


ImportError Traceback (most recent call last)
in ()
----> 1 from yoloface import YoloDetector
2 import numpy as np
3 from PIL import Image
4
5 model = YoloFace(target_size=720,gpu=0,min_face=90)

/content/yoloface/yoloface.py in ()
11 from math import sqrt
12
---> 13 from .models.common import Conv
14 from .models.yolo import Model
15 from .utils.datasets import letterbox

ImportError: attempted relative import with no known parent package


NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.


How should i fix this?

Thanks
Best regards

Detect several images

I am trying to use your face detector script to get the bboxes on several images but it does not work how it is expected. First of all, your README describes that you can pass several images packed in a list to get multi-image predictions with the following example:
bboxes,points = model.predict([image1,image2])
but does not mention if the image1 and image2 are the paths to that images or the object you get after you open them with PIL (for example: Image.open('image1'), assuming they have the same root directory). I get the following errors in this cases:

Traceback (most recent call last):
File "C:\YOLOv5\yoloface\detect.py", line 65, in
_main(arguments)
File "C:\YOLOv5\yoloface\detect.py", line 58, in _main
bboxes, points = model.predict(orgimg)
File "C:\YOLOv5\yoloface\face_detector.py", line 159, in predict
images = self._preprocess(images)
File "C:\YOLOv5\yoloface\face_detector.py", line 73, in _preprocess
h0, w0 = img.shape[:2] # orig hw
ValueError: not enough values to unpack (expected 2, got 1)

from this call: orgimg = np.array([Image.open('00000002.png'), Image.open('00000001.png')]) bboxes, points = model.predict(orgimg) (when I pass the images as PIL objects)

Traceback (most recent call last):
File "C:\YOLOv5\yoloface\detect.py", line 65, in
_main(arguments)
File "C:\YOLOv5\yoloface\detect.py", line 58, in _main
bboxes, points = model.predict(orgimg)
File "C:\YOLOv5\yoloface\face_detector.py", line 159, in predict
images = self._preprocess(images)
File "C:\YOLOv5\yoloface\face_detector.py", line 73, in _preprocess
h0, w0 = img.shape[:2] # orig hw
ValueError: not enough values to unpack (expected 2, got 1)

from this call: orgimg = np.array(['00000002.png', '00000001.png']) bboxes, points = model.predict(orgimg) (where I pass the images as paths to them)

Traceback (most recent call last):
File "C:\YOLOv5\yoloface\detect.py", line 65, in
_main(arguments)
File "C:\YOLOv5\yoloface\detect.py", line 58, in _main
bboxes, points = model.predict(['00000002.png', '00000001.png'])
File "C:\YOLOv5\yoloface\face_detector.py", line 159, in predict
images = self._preprocess(images)
File "C:\YOLOv5\yoloface\face_detector.py", line 73, in _preprocess
h0, w0 = img.shape[:2] # orig hw
AttributeError: 'str' object has no attribute 'shape'

from this call: bboxes, points = model.predict(['00000002.png', '00000001.png']) (where I pass the images as paths to them)

and

Traceback (most recent call last):
File "C:\YOLOv5\yoloface\detect.py", line 65, in
_main(arguments)
File "C:\YOLOv5\yoloface\detect.py", line 58, in _main
bboxes, points = model.predict([Image.open('00000002.png'), Image.open('00000001.png')])
File "C:\YOLOv5\yoloface\face_detector.py", line 159, in predict
images = self._preprocess(images)
File "C:\YOLOv5\yoloface\face_detector.py", line 73, in _preprocess
h0, w0 = img.shape[:2] # orig hw
File "C:\Users\rtanase\Anaconda3\envs\detect\lib\site-packages\PIL\Image.py", line 519, in getattr
raise AttributeError(name)
AttributeError: shape

from this call: bboxes, points = model.predict([Image.open('00000002.png'), Image.open('00000001.png')]) (when I pass the images as PIL objects)

How to use it together with a vertical photo?

Hi!
Firstly, thank you so much for such a convenient wrapper, you saved a lot of time, thank you again!
When trying to "drive away" a vertical photo, unfortunately I encounter an error

RuntimeError: Given groups=1, weight of size [32, 3, 3, 3], expected input[1, 4, 608, 608] to have 3 channels, but got 4 channels instead

I will be glad to help, thanks a lot in advance!
Have a nice day :D

Faulty append to python system path

sys.path.append(os.path.abspath(os.path.join(os.path.dirname("__file__"), '..')))

I think this needs to be
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
instead of
sys.path.append(os.path.abspath(os.path.join(os.path.dirname("__file__"), '..')))

What is an anti_profile model?

Hello!
In source code there is mentioned anti profile model to determine, whether a face is frontal or not

self.anti_profile = joblib.load(os.path.join(self._class_path, 'models/anti_profile/anti_profile_xgb_new.pkl'))

But there is no such file in models folder, nor the mentioning about that in readme

Can you please tell me, what is it and where could it be found?

Readme clarification

In README you use as an example YoloDetector(target_size=720,gpu=0,min_face=90). But YoloDetector has no parameter gpu, i guess it should be device

Train

Hello,

Is there any support for training / fine-tune weights on personal datasets? Or I should use the train script from the deepcam repository? Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.