Skip to content
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

Pre-trained data set test & misc. questions #3

Closed
AlmasM opened this issue Feb 27, 2017 · 5 comments
Closed

Pre-trained data set test & misc. questions #3

AlmasM opened this issue Feb 27, 2017 · 5 comments

Comments

@AlmasM
Copy link

AlmasM commented Feb 27, 2017

Hi,

I followed the installation instructions and wanted to test the pre-trained data set you provided. However, when I run the python code, I get the following error:

(cv) amyrzat@ainos03:~/face-py-faster-rcnn-master/tools$  python run_face_detection_on_fddb.py --gpu=0
Traceback (most recent call last):
  File "run_face_detection_on_fddb.py", line 4, in <module>
    from fast_rcnn.test import im_detect
  File "/home/amyrzat/face-py-faster-rcnn-master/tools/../lib/fast_rcnn/test.py", line 17, in <module>
    from fast_rcnn.nms_wrapper import nms
  File "/home/amyrzat/face-py-faster-rcnn-master/tools/../lib/fast_rcnn/nms_wrapper.py", line 9, in <module>
    from nms.gpu_nms import gpu_nms
ImportError: No module named gpu_nms

Also, on Friday I deleted the repository and tried to re download it again with the command you provided, but I got the following error:

git clone --recursive git@github.com:playerkk/face-py-faster-rcnn.git
Cloning into 'face-py-faster-rcnn'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

When I downloaded your repository couple weeks ago, the command worked, but now it doesn't.

Also, I realized that in the file run_face_detection_on_fddb.py you are using FDDB to test the data, but your Readme file doesn't instruct to download it.

I am new to this, so if there is anything I am missing, please let me know.

Thank you in advance.

@playerkk
Copy link
Owner

  1. you have to cd to $FRCN/lib and then run "make" in the terminal. (step 3 of the installation section)
  2. If you can't download the repository, I think it might be due to the setting of your git (eg, ssh key).
  3. You can find more information of FDDB here http://vis-www.cs.umass.edu/fddb/

@AlmasM
Copy link
Author

AlmasM commented Feb 28, 2017

Thank you! I was able to fix and successfully install everything.

Now, however, whenever I run python code, I get the following error.

(cv) amyrzat@ainos03:~/rcnn/face-py-faster-rcnn-master/tools$ python run_face_detection_on_fddb.py --gpu=0
Traceback (most recent call last):
  File "run_face_detection_on_fddb.py", line 104, in <module>
    net = caffe.Net(prototxt, caffemodel, caffe.TEST)
RuntimeError: Could not open file models/face/VGG16/faster_rcnn_end2end/test.prototxt

@playerkk
Copy link
Owner

You need to run the code in the root directory of the repository, like
python ./tools/run_face_detection_on_fddb.py --gpu=0

@AlmasM
Copy link
Author

AlmasM commented Feb 28, 2017

Thank you very much!

So, when I run command, this is what I get: python ./tools/run_face_detection_on_fddb.py --gpu=0

Loaded network /home/amyrzat/output/vgg16_faster_rcnn_iter_80000.caffemodel
F0228 15:46:41.819329  5875 syncedmem.cpp:56] Check failed: error == cudaSuccess (2 vs. 0)  out of memory
*** Check failure stack trace: ***
Aborted (core dumped)

But if I do the following command, the program runs.
python ./tools/run_face_detection_on_fddb.py --gpu=1

However, I also get the following result. I looked online, and I found that I might be naming my files wrong and the program can't find it. I double checked run_face_detection_on_fddb.py to see if it access right directories, but I couldn't fix it.

File "./tools/run_face_detection_on_fddb.py", line 146, in <module>
  scores, boxes = im_detect(net, im)
File "/home/amyrzat/rcnn/face-py-faster-rcnn-master/tools/../lib/fast_rcnn/test.py", line 121, in im_detect
  blobs, im_scales = _get_blobs(im, boxes)
File "/home/amyrzat/rcnn/face-py-faster-rcnn-master/tools/../lib/fast_rcnn/test.py", line 103, in _get_blobs
  blobs['data'], im_scale_factors = _get_image_blob(im)
File "/home/amyrzat/rcnn/face-py-faster-rcnn-master/tools/../lib/fast_rcnn/test.py", line 33, in _get_image_blob
  im_orig = im.astype(np.float32, copy=True)
AttributeError: 'NoneType' object has no attribute 'astype'

Thank you once again.

@AlmasM
Copy link
Author

AlmasM commented Mar 1, 2017

I deleted and re-downloaded FDDB. It worked. Thank you for all of your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants