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

Created model to recognise UFO sightings #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KhyatiGanatra
Copy link

The model is able to classify UFO soghting among spotlight, roundworm, nematode.

Done as a part of TEAM03 Extra Credit

Signed-off-by: Khyati Ganatra <khyati.ganatra@gmail.com>
Copy link

@prenastro prenastro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Modified the command used to test new model on an image to handle errors.
  2. 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

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

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

Attaching Picture:
screen shot 2018-04-14 at 8 12 37 am

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 \
Copy link

@prenastro prenastro Apr 14, 2018

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

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.

None yet

2 participants