Skip to content

maydixit/CNN_for_Surveillance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preparing model:

  • Install bazel ( check tensorflow's github for more info ) Ubuntu: - Requirements: sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer - Download bazel, ( https://github.com/bazelbuild/bazel/releases ) tested on: https://github.com/bazelbuild/bazel/releases/download/0.2.0/bazel-0.2.0-jdk7-installer-linux-x86_64.sh - chmod +x PATH_TO_INSTALL.SH - ./PATH_TO_INSTALL.SH --user - Place bazel onto path ( exact path to store shown in the output)
  • For retraining, prepare folder structure as
    • root_folder_name
      • class 1
        • file1
        • file2
      • class 2
        • file1
        • file2
  • Clone tensorflow
  • Go to root of tensorflow
  • bazel build tensorflow/examples/image_retraining:retrain
  • bazel-bin/tensorflow/examples/image_retraining/retrain --image_dir /path/to/root_folder_name --output_graph /path/output_graph.pb --output_labels /path/output_labels.txt --bottleneck_dir /path/bottleneck ** Training done. ** For testing through bazel, bazel build tensorflow/examples/label_image:label_image &&
    bazel-bin/tensorflow/examples/label_image/label_image
    --graph=/path/output_graph.pb --labels=/path/output_labels.txt
    --output_layer=final_result
    --image=/path/to/test/image

For testing through python, change and run the python code classify.py python classify.py testimages/abandoned.jpg models/bag_detection.pb labels/bag_detection.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages