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

[jsk_perception] Scripts for Bag of Features Object Recognition #1001

Merged
merged 3 commits into from
Jul 13, 2015

Conversation

wkentaro
Copy link
Member

These scripts are moved from start-jsk/2014-semi and rewrited to be used in more general cases.

image

@wkentaro
Copy link
Member Author

Tutorial

Download raw data

$ roscd jsk_data
$ make large KEYWORD:=jsk_2014_picking_challenge/20150428_collected_images

Create sift dataset

$ roslaunch jsk_perception create_feature0d_dataset.launch container_path:=`rospack find jsk_data`/large/20150428_collected_images

Extract bag of features & its histogram

$ rosrun jsk_perception extract_bof.py fit `rospack find jsk_perception`/trained_data/feature0d_dataset.pkl.gz -O `rospack find jsk_perception`/trained_data/bof.pkl.gz
$ rosrun jsk_perception extract_bof.py dataset `rospack find jsk_perception`/trained_data/feature0d_dataset.pkl.gz `rospack find jsk_perception`/trained_data/bof.pkl.gz -O `rospack find jsk_perception`/trained_data/bof_hist.pkl.gz

Train classifier

$ rosrun jsk_perception simple_classifier_trainer.py `rospack find jsk_perception`/trained_data/bof_hist.pkl.gz -O `rospack find jsk_perception`/trained_data/clf.pkl.gz

Run for real objects

$ wget https://i.warosu.org/data/ck/img/0048/57/1381305564234.jpg -O /tmp/oreo_mega_stuf_sample.jpg
$ roscore
$ rosrun jsk_perception image_publisher.py _file_name:=/tmp/oreo_mega_stuf_sample.jpg
$ rosrun imagesift imagesift image:=/image_publisher/output
$ rosrun jsk_perception extract_bof.py extract `rospack find jsk_perception`/trained_data/bof.pkl.gz
$ rosrun jsk_perception simple_classifier.py _clf_path:=`rospack find jsk_perception`/trained_data/clf.pkl.gz

$ rostopic echo /simple_classifier/output
data: oreo_mega_stuf
---
data: oreo_mega_stuf
---
...

@wkentaro wkentaro force-pushed the create-feature0d-dataset branch from 3219284 to 90b2623 Compare July 12, 2015 12:53
@wkentaro wkentaro changed the title [jsk_perception] Scripts for bof and its hist extractor [jsk_perception] Scripts for Bag of Features Object Recognition Jul 12, 2015
@garaemon
Copy link
Member

Write down it in README.md

@wkentaro wkentaro force-pushed the create-feature0d-dataset branch 5 times, most recently from 8e42109 to 5761078 Compare July 12, 2015 13:37
@wkentaro wkentaro force-pushed the create-feature0d-dataset branch from 5761078 to d167fda Compare July 12, 2015 13:38
@wkentaro
Copy link
Member Author

I added description to readme like below:


image

garaemon added a commit that referenced this pull request Jul 13, 2015
[jsk_perception] Scripts for Bag of Features Object Recognition
@garaemon garaemon merged commit b8cd66d into jsk-ros-pkg:master Jul 13, 2015
@wkentaro wkentaro deleted the create-feature0d-dataset branch July 13, 2015 04:11
@k-okada k-okada mentioned this pull request May 6, 2016
19 tasks
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

Successfully merging this pull request may close these issues.

2 participants