Git Product home page Git Product logo

facealign's People

Contributors

roblourens 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

facealign's Issues

Add FAQ explaining the solution to common errors

Here are two that I ran into that are easy to solve, but not obvious by their error output:

Q: I get this error, what do I do?
File "/home/doriad/src/facealign/src/FaceImage.py", line 1, in
import cv
ImportError: No module named cv

A) (at least on Ubuntu 11.10):
sudo apt-get install python-opencv


Q) I get this error, what do I do?
*** Incomplete: data/1.jpg ***
Traceback (most recent call last):
File "/home/doriad/src/facealign/src/FaceImage.py", line 133, in runFaceImage
fi.cropToFace()
File "/home/doriad/src/facealign/src/FaceImage.py", line 23, in cropToFace
face = self._getFaceCoords()
File "/home/doriad/src/facealign/src/FaceImage.py", line 68, in _getFaceCoords
cascade = cv.Load(HCPATH)
TypeError: OpenCV returned NULL

A) This means you have not set your HCDIR variable correctly. Open src/config.py and set HCDIR to
[yourOpenCVDir]/opencv/data/haarcascades/, for example:
HCDIR = '/home/doriad/src/OpenCV/opencv/data/haarcascades/'

Error: NoneType' object has no attribute '__getitem__'

Hello, Sir. Thanks for sharing your code. I run it but it had error. I create a folder that name is "in-faces" and it contain one files is 0001.jpg. I called that function but it error as below. Please help me slove it.
$python src/sizeToFace.py in-images

========Error=============

Traceback (most recent call last):
File "src/sizeToFace.py", line 77, in
main()
File "src/sizeToFace.py", line 24, in main
files = sortedImages(args[0])
File "src/sizeToFace.py", line 64, in sortedImages
files.append((getImageDate(filePath), filePath))
File "src/sizeToFace.py", line 74, in getImageDate
return Image.open(filePath)._getexif()[DateTimeOriginalKey]
TypeError: 'NoneType' object has no attribute 'getitem'

No error, but also no jpgs

The script runs and after "beginning FaceImage run for image path: /Users/markolf/Desktop/in-images/IMG_0555.JPG" nothing happens and no jpgs are created.
facealign-script

Any idea what's going on here?
Thanks!

TypeError: '<' not supported between instances of 'JpegImageFile' and 'JpegImageFile'

Hello!

I understand that it has been multiple years since this project began but this is kind of my last hope in terms of making a time-lapse from images that I have been taking for quite a while. I am getting an error which I do not know how to resolve myself and it would be appreciated if you could look into it. What you've done here is greatly helpful, so I would like to thank you for the time you spent on it.

C:\Users\User>python C:\Users\User\Downloads\facealign-master\facealign-master\src\sizeToFace.py C:\Users\User\Desktop\TimeLapse A:\My Files\Face Alignment Traceback (most recent call last): File "C:\Users\User\Downloads\facealign-master\facealign-master\src\sizeToFace.py", line 77, in <module> main() File "C:\Users\User\Downloads\facealign-master\facealign-master\src\sizeToFace.py", line 24, in main files = sortedImages(args[0]) File "C:\Users\User\Downloads\facealign-master\facealign-master\src\sizeToFace.py", line 68, in sortedImages files.sort(key=itemgetter(0,1)) TypeError: '<' not supported between instances of 'JpegImageFile' and 'JpegImageFile'

Please let me know if you need any further information, I would be happy to provide it.

Thanks!

*** Incomplete: in_2017_folder/IMG_5560.jpg ***

I cannot get the script to run, I get the error below for pretty much any image in the folder in_2017_folder.
Both input and output folders to exists.
(Trying on OS X 10.12.6 (16G1114)) with Python 2.7.10.

*** Incomplete: in_2017_Habi/IMG_5560.jpg ***
Traceback (most recent call last):
  File "/Users/habi/Dev/facealign/src/FaceImage.py", line 344, in runFaceImage
    fi.save(outpath)
  File "/Users/habi/Dev/facealign/src/FaceImage.py", line 159, in save
    if self._finalImg == None:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

KeyError: 36867

got python and opencv install but getting this error when i attempt to run your script. any ideas? thanks!

$ ./sizeToFace.py /Users/starpause/Downloads/facealign-master/src/prplmisteyk
Traceback (most recent call last):
  File "./sizeToFace.py", line 77, in <module>
    main()
  File "./sizeToFace.py", line 24, in main
    files = sortedImages(args[0])
  File "./sizeToFace.py", line 64, in sortedImages
    files.append((getImageDate(filePath), filePath))
  File "./sizeToFace.py", line 74, in getImageDate
    return Image.open(filePath)._getexif()[DateTimeOriginalKey]
KeyError: 36867

No jpg files found?

Hey there this is Derrick and I have a problem regarding the import of images. Apparently I have installed all necessary packages and when I tried to run sizeToFace it prompts a error saying "no jpg files found" (as the image shown below). Please help. Thank you very much!
Derrick

I tried 2 different ways to input the import dir but neither worked out
image
image

!empty() in function 'cv::CascadeClassifier::detectMultiScale'

I'm continually receiving this error message upon running the command.

beginning FaceImage run for image path: Selfie_a_Day_Project_January_2019\20190131_210126.jpg
Starting Selfie_a_Day_Project_January_2019\20190131_210126.jpg
No eyes found, falling back on face

*** Incomplete: Selfie_a_Day_Project_January_2019\20190131_210126.jpg ***
Traceback (most recent call last):
File "C:\Users\Tony\Documents\Projects\facealign\src\FaceImage.py", line 343, in runFaceImage
fi.cropToFace()
File "C:\Users\Tony\Documents\Projects\facealign\src\FaceImage.py", line 117, in cropToFace
face = self._getFace()
File "C:\Users\Tony\Documents\Projects\facealign\src\FaceImage.py", line 257, in _getFace
faces = toRects(cascade.detectMultiScale(self.image))
cv2.error: OpenCV(4.1.2) C:\projects\opencv-python\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale'

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.