roblourens / facealign Goto Github PK
View Code? Open in Web Editor NEWFaceAlign is a tool that can align a set of images containing faces
FaceAlign is a tool that can align a set of images containing faces
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/'
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'
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!
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()
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
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
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'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.