One of the common running themes in the campus cafeteria is the hold up in foot traffic in queueing due to food checkout. We find out that the bottleneck is caused by the staff requiring extra time to look up the prices of those miscellaneous entrees and calculate the total due amount. Thus, we were inspired to build up an object detection model that recognizes entrees in the plate and calculates the total due amount automatically. With the model, the staff no longer need to perform mental calculations.
For more details on this project, checkout our project report and conference paper.
We also saved the two keras model structures for references. The training model takes a 416x416x3 iamge as its input, and the three outputs of the model are the three different training losses produced from the three different scales according to the original paper. As for the inferencing model, it takes in a 416x416x3 iamge as well and produces the bounding boxes predictions at three different scales.
- Python 3.7
- NumPy 1.16.0
- Tensorflow 1.13.2
- Keras 2.2.5
- OpenCV (not version dependent)
- tqdm (not version dependent)
Train the model base on the settings in the config.json
.
python train.py -c config.json
One can evaluate the model accuracy with the following command after training.
python evaluate.py -c config.json
python predict.py -c config.json -i /path/to/the/image [-o /path/to/the/output/folder/]
python predict.py -c config.json -i /path/to/the/image/folder [-o /path/to/the/output/folder/]
python predict.py -c config.json -i /path/to/the/video [-o /path/to/the/output/folder/]
python predict.py -c config.json -i webcam0
The number 0
in the parameter webcam0
can be changed to the number of the order of the webcam installed on your device.
Special thanks to experiencor/keras-yolo3 repository which provides an implementation of YOLOv3 by using Python, TensorFlow and Keras:)