-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing ReadMe info? #1
Comments
So starting with a folder containing a bunch of images with faces, it looks like the script is not that clear. Do I need to use a CSV file? Or was that just for stats relating to different players? Combine.py needs the: '../Pictures/Difference/' directory, and writes to the Fill.py needs the: '../Pictures/Worked/' directory, and it writes images to the '../Pictures/Worked/' directory. Plotter.py just puts the final output image on a plot. Reshape.py needs the '../Pictures/Worked/' directory, and writes images to the: "../Pictures/Worked/" directory. Size.py needs the So it looks like I have to first sort the images into right and left folders, before running Size.py and Reshape.py? Size.py requires |
Should I be using OpenCV2 or OpenCV3? Which version of Python do the scripts use? |
Ok, I installed OpenCV3, Dlibm and OpenBLAS via: https://www.learnopencv.com/install-opencv3-on-ubuntu/ https://www.learnopencv.com/install-dlib-on-ubuntu/
Trying to run your code results in:
|
Python3 versus Python2.7:
Unsure of how to fix this error:
Edit: That error was caused by my renaming of the Or maybe the issues is related to a different directory structure? |
So OpenCV3 and Python3 seem to work for the Reshape script, once I changed the directory names to match where I put the images. So Reshape.py appears to have made my images completely black. Not sure why it did this, if this is intentional, or if it's something I need to fix? |
Running Combine.py on the unmodified Images:
To run Fill.py, I needed to do Running Fill.py on unmodified images doesn't seem to do anything. Line number 1 of the Fill.py script needed to be commented out, for the script to work. So I somehow need to Resize the images with Size.py, but that script has confusing "left" and "right" directories. |
So Size.py requires 3 folders. I think that maybe the "Left" folder and "Right" Folder are for images that a flipped horizontally or something like that? Though when running that, only the Left side image got modified, and it sort of weirdly cropped out the background? The Resize folder just has it's images resized. But the resizing does not take anything into account, so I think that might not work until some other step. |
Using Reshape.py with the provided example images located at: https://github.com/SoumitraAgarwal/Golfer-face-analysis/tree/master/Pictures/Right, outputs the images with the faces and everything properly aligned, with a blocky cropping that removed most of the background. All the example input images are the same size, so I don't know if it resizes images as well. I assume that once Reshape.py has been run, then Combine.py can be run on the outputs to create the final averaged image? What are all the other scripts for? |
So after using Reshape.py, I then used Combine.py on all the centered images. This created the final averaged output! Though Combine.py did have some weird error:
Though that error does not appear to have caused the script to fail. The outputs were created, and they were created correctly. |
Every custom image that I try with Reshape.py ends up either completely black, or with some random cropped/zoomed in section. |
It looks like these lines of code: https://github.com/SoumitraAgarwal/Golfer-face-analysis/blob/master/Image%20processing/Reshape.py#L199-L202, are responsible for the black images. Changing the values to match the ones output to the terminal while running Reshape.py, creates the images correctly, at least somewhat? Do I have to run my entire data set through, and then average the values for replacing these values?
|
This project works really well for aligning faces: https://github.com/roblourens/facealign You can also use SNFaceCrop to extract faces from images, but SNFaceCrop does not align the faces. After you have your aligned faces, Combine.py is all you really need. |
What do I need to change in order to use my own data set? What are the requirements? What order do I run the scripts? And what do I need to do in order to make each script work?
The text was updated successfully, but these errors were encountered: