2. Football play detection with Tensorflow API

We used ssdlite_mobilenet_v2_coco[Download Link] to analyze soccer games in real time because we need fast computing speed. But as you can see in the image below, our model(Left) performs very well even though it is a lightweight model.

[main code]

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 nameSpeed (ms)COCO mAP
mask_rcnn_resnet101_atrous_coco47033
faster_rcnn_resnet101_coco10632
ssd_mobilenet_v2_coco3122
ssdlite_mobilenet_v2_coco2722

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 )

result1 result2 result3

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.


© 2020. All rights reserved.