-
Notifications
You must be signed in to change notification settings - Fork 18
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
Created model to recognise UFO sightings #8
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Steps: | ||
|
||
This folder contains output_labels.txt and output_graph.pb | ||
|
||
THis model has retrained on classes of UFO sightings: | ||
* spotlight | ||
* roundworm | ||
* nematode | ||
|
||
|
||
We scraped images from ufostalker website. We then found 3 most occuring classes. We wanted to have more images per class. | ||
|
||
We retrain an already existing model based on our images. the steps for those are found here: | ||
https://www.tensorflow.org/tutorials/image_retraining | ||
|
||
Requirements: tensorflow | ||
|
||
## Steps for UFO sightings: | ||
1. Create directory structure such that images of given class are in single folder. all these folders are within main folder. | ||
|
||
2. Next run the steps mentioned in tutorial using retraining.py | ||
|
||
3. This will give you output_labels.txt and output_graph.pb | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We used this command to test the retrained model: Note: Command in the tutorial needs to be modified as above to use the default input layer name since we have not specified it explicitly. Otherwise Tensorflow will throw the follwoing error: The image used is to test is taken from the following URL from ufo-stalker.com: These were the results obtained: |
||
After this you can use the model to test on a new image. Sample command is: | ||
python label_image.py \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This command has been changed. Please refer above |
||
--graph=/tmp/output_graph.pb --labels=/tmp/output_labels.txt \ | ||
--input_layer=Placeholder \ | ||
--output_layer=final_result \ | ||
--image=<test_image_path> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
nematode worm | ||
roundworm | ||
spotlight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retrain.py we run this script on our classes folder to retrain the last layer using this command
python retrain.py --image_dir Path-To-UFO-new-classes-folder
Note: retrain.py throws an error if GIF, TIFF images are used. Hence it is suggested to use JPEG or PNG Images.