-
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?
Conversation
Signed-off-by: Khyati Ganatra <[email protected]>
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.
- Modified the command used to test new model on an image to handle errors.
- Added Test image results.
## 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 |
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
We used this command to test the retrained model:
python label_image.py --graph=/tmp/output_graph.pb --labels=/tmp/output_labels.txt --input_layer=Mul --output_layer=final_result --input_mean=128 --input_std=128 --image=/Users/prerana/Desktop/image2.JPG
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:
KeyError: "The name 'import/Placeholder' refers to an Operation not in the graph."
The image used is to test is taken from the following URL from ufo-stalker.com:
https://www.mufoncms.com/files_jeud8334j/91316_submitter_file1__IMG0414.JPG [I have saved it as image2.JPG]
These were the results obtained:
spotlight 0.9694056
roundworm 0.021185338
nematode 0.009408991
3. This will give you output_labels.txt and output_graph.pb | ||
|
||
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 comment
The reason will be displayed to describe this comment to others. Learn more.
This command has been changed. Please refer above
The model is able to classify UFO soghting among spotlight, roundworm, nematode.
Done as a part of TEAM03 Extra Credit