Bibnumber automatically recognizes bib number from racing photos. As an example, consider this photo:
Calling bibnumber on this example will produce the following output:
[ 38 46 54 69 164 773 775]
Bibnumber also creates small images out of the recognized bibs:
Bibnumber is tuned for high accuracy rather than high recall. Therefore it is not unusual for a bib to be missing in the output however wrong bib numbers are unusual. Since the algorithm precision is low on single-digit bib numbers, those are ignored.
The general pipeline is as follows:
The precision of the algorithm is low for short bibnumbers (less than 3 digits). Therefore, the processing can split into three stages:
The following libraries should be installed to build Bibnumber:
To build the project:
make -C bibnumber/Debug
./bibnumber [-train dir] [-model svmModel.xml] image_file|folder_path|csv_ground_truth_file
Bibnumber can either process whole directories or individual images files. To automatically quantify the quality of bib detections, a ground truth .csv file can be used and Bibnumber will display the F-score when done.
In order to train a HOG+SVM bib detector from a number of bib images, the training directory may be specified and Bibnumber will create the SVM model.xml file, which can then be used in a second pass to detect shorter bib numbers (2 letters) with better accuracy.