This repo is merged to knorth55/coral_usb_ros
git clone https://github.com/knorth55/73b2_kitchen_edgetpu_object_detection.git
cd 73b2_kitchen_edgetpu_object_detection
mkdir learn/
docker build docker/ --tag 73b2-kitchen-object-detection
bash run.bash
Inside docker, run commands below
cd /tensorflow/models/research/73b2_kitchen_learn
gdown https://drive.google.com/uc?id=1iBSxX7I0nFDJfYNpFEb1caSQ0nl4EVUa
tar zxvf kitchen_dataset.tgz
First you need VOC format annotation. For the annotation, please read here.
Inside docker, plear download and rename, setup your dataset directory like below.
73b2_kitchen_edgetpu_object_detection/learn/kitchen_dataset # or 73b2_kitchen_learn in docker container
|-- train # train dataset
| |-- JPEGImages
| |-- SegmentationClass
| |-- SegmentationClassPNG
| |-- SegmentationClassVisualization
| |-- SegmentationObject
| |-- SegmentationObjectPNG
| |-- SegmentationObjectVisualization
| `-- class_names.txt
`-- test # test dataset
|-- JPEGImages
|-- SegmentationClass
|-- SegmentationClassPNG
|-- SegmentationClassVisualization
|-- SegmentationObject
|-- SegmentationObjectPNG
|-- SegmentationObjectVisualization
`-- class_names.txt
bash run.bash
Inside docker
cd /tensorflow/models/research/73b2_kitchen_scripts
# prepare dataset
./prepare_checkpoint_and_dataset.sh --train_whole_model false --network_type mobilenet_v2_ssd
# retraining on GPU 0
CUDA_VISIBLE_DEVICES=0 ./retrain_detection_model.sh --num_training_steps 500 --num_eval_steps 100
# change to edgetpu model
./convert_checkpoint_to_edgetpu_tflite.sh --checkpoint_num 500
bash run.bash
Inside docker
cd /tensorflow/models/research/73b2_kitchen_scripts
# prepare dataset
./prepare_checkpoint_and_dataset.sh --train_whole_model true --network_type mobilenet_v2_ssd
# retraining on GPU 0
CUDA_VISIBLE_DEVICES=0 ./retrain_detection_model.sh --num_training_steps 50000 --num_eval_steps 2000
# change to edgetpu model
./convert_checkpoint_to_edgetpu_tflite.sh --checkpoint_num 50000
docker exec -it 73b2-kitchen-edgetpu /bin/bash
Inside docker
tensorboard --logdir=./73b2_kitchen_learn/train
You can see Tensorboard in localhost:6006.
Compile and get output_tflite_graph_edgetpu.tflite
model file!
bash run.bash
Inside docker
cd /tensorflow/models/research/73b2_kitchen_learn/models
edgetpu_compiler output_tflite_graph.tflite