Skip to content

lacmus-foundation/coral-tpu-sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coral-tpu-sandbox

tpu sandbox for project hack (spb 2020)

useful links and tips

Usage

$ docker build -f Dockerfile --tag coral-classify-cpu .
# $ sudo docker build -f Dockerfile.gpu.dockerfile --tag coral-classify-gpu .

$ mkdir experements
$ docker run --name edgetpu-classify \
--rm -it --privileged -p 6006:6006 \
--mount type=bind,src=${PWD}/experements,dst=/tensorflow/models/research/slim/transfer_learn \
coral-classify-cpu
# Now prepare the dataset:
$ ./prepare_checkpoint_and_dataset.sh --network_type mobilenet_v1 # mobilenet_v2 inception_v4

# Train with quantization-aware training
$ ./start_training.sh --network_type mobilenet_v1
# $ ./start_training.sh --network_type mobilenet_v1 --train_whole_model true

# evaluate
$ ./run_evaluation.sh --network_type mobilenet_v1

# convert to tf_lite 
$ ./convert_checkpoint_to_edgetpu_tflite.sh --network_type mobilenet_v1 --checkpoint_num 300
# Compile the model:
$ edgetpu_compiler output_tflite_graph.tflite
# predict
$ python ./src/inference/classify_image.py \
--model output_tflite_graph_edgetpu.tflite \
--label labels.txt \
--input img.jpg

About

tpu sandbox for project hack (spb 2020)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published