mks0601 / A-Convolutional-Neural-Network-Cascade-for-Face-Detection

TensorFlow implementation of "A Convolutional Neural Network Cascade for Face Detection", CVPR 2015
http://www.cv-foundation.org/openaccess/content_cvpr_2015/papers/Li_A_Convolutional_Neural_2015_CVPR_paper.pdf
109 stars 62 forks source link

requirements.txt for project #15

Closed rmariusg closed 5 years ago

rmariusg commented 6 years ago

Hi, Even though you made this project around two years ago (at the moment of writing this request), could you write a requirements.txt for this project to help us who are still learning and reduce the back and forth time for finding all the necessary libraries?

Thank you very much, Marius

mks0601 commented 6 years ago

There is no much things to do before running this code if you use Ubuntu and TensorFlow. I think the only thing to consider is the version of TF becasue this project is implemented on the old version of Tensorflow. Is there anything makes you difficult to run this code?

rmariusg commented 6 years ago

I'm currently running with python3 and the latest TensorFlow that comes from installing it with pip. Still waiting for the 12-net to finish with the negatives. After I finish successfully, would you agree with me sending you some info on how to run it on Windows to attach it to the readme or wherever? :)

mks0601 commented 6 years ago

Sorry, I haven`t used window for TF. You may find other useful post in the google.

rmariusg commented 6 years ago

Hey, I managed to run the code by moving it to a Ubuntu 18.04.1 virtual machine and using python2 with TensorFlow 1.10. After running train_12net, train_calib 12 and then trying to do a hard_neg_mining 24 it stops at around 127/828 (my neg files) and it says it just killed the process with no warning whatsoever. I tried debugging it, but couldn't figure it out. Do you have some pointers to give?

mks0601 commented 6 years ago

Did you check the RAM status? Maybe the error comes from OOM.

rmariusg commented 6 years ago

Well, I have around 5 gigs or RAM. Do you believe it'd be enough? To be mentioned: tensorflow runs only on CPU on the VM.

rmariusg commented 6 years ago

Another issue arose:

Traceback (most recent call last):
  File "/home/rmariusg/Downloads/cercetare/A-Convolutional-Neural-Network-Cascade-for-Face-Detection/hard_neg_mining.py", line 145, in <module>
    neg_db_12[iid,:] = util.img2array(cropped_img,param.img_size_12)
  File "/home/rmariusg/Downloads/cercetare/A-Convolutional-Neural-Network-Cascade-for-Face-Detection/util.py", line 14, in img2array
    if img.size[0] != param.img_size_12 or img.size[1] != param.img_size_12:
AttributeError: 'int' object has no attribute 'size'

I can't for the love of me figure out why the heck I get a box[5] of just 0. And only when I have an extremely low number of neg_train images...

mks0601 commented 5 years ago

Solved? please ask me again if you meet any problems.