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

how to use the pre-trained model? #4

Closed
thuwangzhe opened this issue Mar 8, 2017 · 5 comments
Closed

how to use the pre-trained model? #4

thuwangzhe opened this issue Mar 8, 2017 · 5 comments

Comments

@thuwangzhe
Copy link

Hi playerkk,
I'm new to the face detection with faster-rcnn, here is my question:
I have downloaded your pre-trained model "vgg16-faster-rcnn-iter-80000.caffemodel", but I don't know how to use it to test my own images. In the py-faster-rcnn, I can use the demo.py to test my images, but in your project, I don't know how to change it. Could you help me?
Thank you in advance.

@playerkk
Copy link
Owner

playerkk commented Mar 8, 2017

You can run
python ./tools/run_face_detection_on_fddb.py --gpu=0
in the terminal. It will load the pre-trained model and run face detection on FDDB. You might need to take a look at the code.

@thuwangzhe
Copy link
Author

oh, I know. I can change my images into the FDDB format, then test it. Thank you very much !

@thuwangzhe
Copy link
Author

Hi,
I downloaded the FDDB data set and run
python ./tools/run_face_detection_on_fddb.py --gpu=0
in the terminal. Here is my question:
Loaded network output/faster_rcnn_end2end/train/vgg16_faster_rcnn_iter_80000.caffemodel
1 Traceback (most recent call last):
File "./tools/run_face_detection_on_fddb.py", line 146, in
scores, boxes = im_detect(net, im)
File "/home/wangz/face-py-faster-rcnn/tools/../lib/fast_rcnn/test.py", line 121, in im_detect
blobs, im_scales = _get_blobs(im, boxes)
File "/home/wangz/face-py-faster-rcnn/tools/../lib/fast_rcnn/test.py", line 103, in _get_blobs
blobs['data'], im_scale_factors = _get_image_blob(im)
File "/home/wangz/face-py-faster-rcnn/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'

I don't know how to fix it. Could you help me ? Thanks again!

@playerkk
Copy link
Owner

playerkk commented Mar 8, 2017

Mostly likely the image reading failed. You might want to check the path of your input images.

@thuwangzhe
Copy link
Author

I fixed it~ I build a wrong input path. Thank you !

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