2. Football play detection with Tensorflow API
in AI-Project
Data Download
EasyDownloader [GitHub Link]
Download images that have both ‘football category’ and ‘personal category’ in each image with the code below.
python ../0.Open-Images_EasyDownload/EasyDownloader.py
--category "Football"
--category "Person"
--type "inter
tf_record
Create tf_record file with Football_label_map.pbtxt and create_Football_tf_record.py
label_map
item {
name: "/m/01226z"
id: 1
display_name: "Football"
}
item {
name: "/m/01g317"
id: 2
display_name: "Person"
}
usage
python create_Football_tf_record.py
--data_dir=../0.Open-Images_EasyDownload/train_data/images
--output_dir=./Football_tf_record
--label_map_path=./Football_label_map.pbtxt
Train
model
Model name | Speed (ms) | COCO mAP |
---|---|---|
mask_rcnn_resnet101_atrous_coco | 470 | 33 |
faster_rcnn_resnet101_coco | 106 | 32 |
ssd_mobilenet_v2_coco | 31 | 22 |
ssdlite_mobilenet_v2_coco | 27 | 22 |
We used ssdlite_mobilenet_v2_coco[Download Link] to analyze soccer games in real time because we need fast computing speed.
Result
graph
DetectionBoxes_Precision(coco_metrics)
DetectionBoxes_Recall(coco_metrics)
Performance by category(oid_v2_metrics)
Performance by total(oid_v2_metrics)
Image(Left : our model / Right : ground truth )
Conclusion
As you can see in the image of the result, ground truth recognizes people as one, but in our model, we see one by one.