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

Simple python example #13

Open
colincsl opened this issue May 26, 2015 · 15 comments
Open

Simple python example #13

colincsl opened this issue May 26, 2015 · 15 comments

Comments

@colincsl
Copy link

It's great that you made easy-to-use code to evaluate on multiple datasets. However, I'm having a little trouble evaluating on individual images for my own application.

Could you make a simple python example showing how to use this library for evaluating on an individual image?

Thanks!

@rodrigob
Copy link
Contributor

rodrigob commented Jun 1, 2015

I think propose_hf5.py has what you are looking for.
One the input options is -i A List of images to evaluate, from what I can see the images path is arbitrary (e.g. not VOC or COCO).

@ksivakumar
Copy link

Will this be like -i (and the image directory)? How do I use that flag? @rodrigob

@philkr
Copy link
Owner

philkr commented Aug 7, 2015

it can be -i /some/directory/*.png.

@ganarajpr
Copy link

I am attempting this

python propose_hf5.py -ib ~/Documents/imagedl/images/ffc24661-57e1-4d79-aeca-7cce7b80dbc2.png ../models/lpo_VOC_0.05.dat

Traceback (most recent call last): File "propose_hf5.py", line 61, in <module> prop.load(args.model_name) AssertionError: Assertion "n == PROP_MAGIC" failed in /home/ganaraj/lpo/lib/proposals/lpo.cpp:61

I am getting the following error ? Anything I need to set ?

@philkr
Copy link
Owner

philkr commented Sep 5, 2015

try: python propose_hf5.py -bi ~/Documents/imagedl/images/ffc24661-57e1-4d79-aeca-7cce7b80dbc2.png ../models/lpo_VOC_0.05.dat
Your command tried to load an image named b and used the png as a model file, which it wasn't. This triggered the assertion.

@ganarajpr
Copy link

python propose_hf5.py -bi ~/Documents/imagedl/images/ffc24661-57e1-4d79-aeca-7cce7b80dbc2.png ../models/lpo_VOC_0.05.dat

usage: propose_hf5.py [-h] [-b] [-bb] [-bo] [-d DATASET] [-i IMAGES [IMAGES ...]] model_name save_path propose_hf5.py: error: too few arguments

Now I get too few arguments

@philkr
Copy link
Owner

philkr commented Sep 5, 2015

python propose_hf5.py -bi ~/Documents/imagedl/images/ffc24661-57e1-4d79-aeca-7cce7b80dbc2.png ../models/lpo_VOC_0.05.dat output.hf5

@mbahacker
Copy link

Hi Phil,

I guess, this works for a data set which is defined already i.e. lpo_VOC_0.05.dat. How do I generate my own dataset for my particular models?

@colincsl
Copy link
Author

This might not be what you're looking for, but here is the script I made for visualizing LPO on a video: https://gist.github.com/colincsl/abd3564d3e95ace2591b. You could easily modify it to take in a directory of images.

@mbahacker
Copy link

Thanks ! I was able to generate the proposal file i.e. *.hf5. I am trying to use these proposals in fast-rcnn but not being able to load them like .mat proposals. Were you able to do that? Any help would be appreciated

@colincsl
Copy link
Author

Yeah I got it running with fast-rcnn but (temporarily) abandoned because it wasn't working on my surgical data.

The code is on my other computer. The ICRA deadline is tonight so I might not be able to get to it until tomorrow. After that, I'll upload the code as soon as I can.

@colincsl
Copy link
Author

@mbahacker It looks like I saved the LPO bounding boxes as a set of mat files instead of as hfd5. I think it was straightforward once I figured out how the bounding boxes were supposed to be stored. I did this around a month ago as a throw away experiment... sorry I don't remember more of the details.

@mbahacker
Copy link

Thanks Colin ! I was able to use the hfd5 files. Thanks for your inputs they helped !!

@tsingtaogemini
Copy link

python propose_hf5.py -bi ~/Desktop/im1.png ../models/lpo_VOC_0.05.dat ~/Desktop/output.hf5

I also got too few argument error, my goal is to generate proposal for voc2007 test data. Could anyone help me?

@rodrigob
Copy link
Contributor

rodrigob commented May 16, 2017

Using

python propose_hf5.py ../models/lpo_VOC_0.05.dat ~/Desktop/output.hf5 -b -i ~/Desktop/im1.png

solved the "too few arguments" error for me on python3.4

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

7 participants