Machine Learning – Object Detection a quick note (draft)

Software Environment

  1. Windows 10
  2. Anaconda for python
  3. TensorFlow-GPU
  4. CUDA v9.0
  5. cuDNN v7.0

 

Setup Application

  1. Open Anaconda prompt
  2. Type “conda create -n tensorflow1 pip python=3.5”
  3. Type “activate tensorflow1”
  4. Type “pip install –ignore-installed –upgrade tensorflow-gpu”
  5. Type “conda install -c anaconda protobuf”
  6. Type “pip install pillow”
  7. Type “pip install lxml”
  8. Type “pip install Cython”
  9. Type “pip install jupyter”
  10. Type “pip install matplotlib”
  11. Type “pip install pandas”
  12. Type “pip install opencv-python”

Configuration PYTHONPATH

Reusing the same environment with a new Object Detection

Command

(tensorflow1) C:\> set PYTHONPATH=D:\master_project\SSD\models;D:\master_project\SSD\models\research;D:\master_project\SSD\models\research\slim
(tensorflow1) C:\> set PYTHONPATH=D:\jebat\FRCNN_XRAY\models;D:\jebat\FRCNN_XRAY\models\research;D:\jebat\FRCNN_XRAY\models\research\slim
set PATH=%PATH%;PYTHONPATH;D:\NVIDIA\cuda\bin

cd D:\master_project\SSD\models\research
protoc –python_out=. .\object_detection\protos\anchor_generator.proto .\object_detection\protos\argmax_matcher.proto .\object_detection\protos\bipartite_matcher.proto .\object_detection\protos\box_coder.proto .\object_detection\protos\box_predictor.proto .\object_detection\protos\eval.proto .\object_detection\protos\faster_rcnn.proto .\object_detection\protos\faster_rcnn_box_coder.proto .\object_detection\protos\grid_anchor_generator.proto .\object_detection\protos\hyperparams.proto .\object_detection\protos\image_resizer.proto .\object_detection\protos\input_reader.proto .\object_detection\protos\losses.proto .\object_detection\protos\matcher.proto .\object_detection\protos\mean_stddev_box_coder.proto .\object_detection\protos\model.proto .\object_detection\protos\optimizer.proto .\object_detection\protos\pipeline.proto .\object_detection\protos\post_processing.proto .\object_detection\protos\preprocessor.proto .\object_detection\protos\region_similarity_calculator.proto .\object_detection\protos\square_box_coder.proto .\object_detection\protos\ssd.proto .\object_detection\protos\ssd_anchor_generator.proto .\object_detection\protos\string_int_label_map.proto .\object_detection\protos\train.proto .\object_detection\protos\keypoint_box_coder.proto .\object_detection\protos\multiscale_anchor_generator.proto .\object_detection\protos\graph_rewriter.proto

python setup.py build
python setup.py install

cd D:\master_project\SSD\models\research\object_detection
python xml_to_csv.py

python generate_tfrecord.py –csv_input=images\train_labels.csv –image_dir=images\train –output_path=train.record
python generate_tfrecord.py –csv_input=images\test_labels.csv –image_dir=images\test –output_path=test.record

python train.py –logtostderr –train_dir=training/ –pipeline_config_path=training/faster_rcnn_inception_v2_pets.config
python train.py –logtostderr –train_dir=training/ –pipeline_config_path=training/ssd_inception_v2_coco.config

python export_inference_graph.py –input_type image_tensor –pipeline_config_path training/faster_rcnn_inception_v2_pets.config –trained_checkpoint_prefix training/model.ckpt-200000 –output_directory inference_graph

Login – ID7vs-j6g-6u5

Image Classification using Convolutional Neural Networks in Keras


CNN
R-CNN
SSD MOBILENET
FASTER RCNN INCEPTION RESNET
SSD INCEPTION
SSD RESNET

untuk kat computer bok,
Tukar ke D
activate tensorflow_gpu

 

Ref:

https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10

https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo.md

https://towardsdatascience.com/build-your-first-deep-learning-classifier-using-tensorflow-dog-breed-example-964ed0689430

https://github.com/matterport/