We would like to detect brand logos in an image.
- Project setup
- Data Preprocessing
- Train models
- Save results
- Write readme with results
- Add training plots to readme
- Tests
- CI/CD
- API
- Deploy
- Train with distractor logo images
I recommended use docker and work inside container
docker build -f ./dockerfiles/gpu/Dockerfile -t logost.tensorflow .
nvidia-docker run -it -v $PWD:/code --net=host --ipc=host logost.tensorflow:latest /bin/bash
You can find origin dataset here Also you can download my train/val/test split with tf.records here
Or you can create your own dataset
mkdir dataset
./scripts/load_data.sh
python ./logos/data_preprocessing.py
python ./logos/create_tf_records.py
name | speed (ms) | train mAP | val mAP | test images | pipeline | checkpoints | |
---|---|---|---|---|---|---|---|
0 | ssd_mobilenet_v1 | 30 | 0.9088 | 0.6811 | load | pipeline | load |
1 | ssd_mobilenet_v1_focal_loss | 30 | 0.9518 | 0.671 | load | pipeline | load |
2 | faster_rcnn_resnet50 | 89 | 0.9893 | 0.7395 | load | pipeline | load |
Parameters
export PATH_TO_YOUR_PIPELINE_CONFIG=...
export PATH_TO_TRAIN_DIR=...
export PATH_TO_EVAL_DIR=...
export TRAIN_PATH=...
export EXPORT_DIR=...
Train/Eval/Export model
python object_detection/train.py \
--logtostderr \
--pipeline_config_path=${PATH_TO_YOUR_PIPELINE_CONFIG} \
--train_dir={PATH_TO_TRAIN_DIR}
python object_detection/eval.py \
--logtostderr \
--pipeline_config_path=${PATH_TO_YOUR_PIPELINE_CONFIG} \
--checkpoint_dir=${PATH_TO_TRAIN_DIR} \
--eval_dir=${PATH_TO_TRAIN_DIR}
python object_detection/export_inference_graph.py \
--input_type image_tensor \
--pipeline_config_path=${PATH_TO_YOUR_PIPELINE_CONFIG} \
--trained_checkpoint_prefix=${TRAIN_PATH} \
--output_directory=${EXPORT_DIR}
- Speed/accuracy trade-offs for modern convolutional object detectors
- Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
- Focal Loss for Dense Object Detection
- A systematic study of the class imbalance problem in convolutional neural networks
- SSD: Single Shot MultiBox Detector
- MobileNetV2: Inverted Residuals and Linear Bottlenecks
- Faster R-CNN Explained
- Understanding SSD MultiBox — Real-Time Object Detection In Deep Learning