Challenge Overview

This Marathon Match is part of the March Madness Marathon Match Series and will have the following prizes and bonuses:

Prize Distribution

 1st                     $12,000
 2nd                      $8,000
 3rd                      $6,000
 4th                      $4,000
 5th                      $3,000
 Total Prizes            $33,000

In addition to the main prizes there are special prizes of $250 each for the highest scoring

  1. first-time marathon participant,

  2. participant who hasn't submitted since 2016, and

  3. first-time sponsored marathon participant.

See here for details.



Facial detection is a problem that has received a significant amount of attention from both the Deep Learning and Biometric communities in the last few years. However, most facial detection models are trained on datasets that lack diversity in pose, levels of occlusion, blurriness and other important properties. This competition is interested in an algorithm capable of performing Facial Detection on a dataset containing multiple images of multiple people. The images may be badly illuminated and vary in terms of quality, blurriness and occlusion. The faces inside these images are of various poses and shapes. In this challenge, we hope to develop a facial detection model which may be utilized in real-world application including surveillance, where there is a huge need for such models and yet a good preforming algorithm does not exist.


Your task will be to detect bounding boxes containing faces from images captured from video frames. The bounding boxes you detect will be compared to ground truth, the quality of your solution will be measured using the mean average precision metric.


Input files

This contest uses a data set that was prepared for a recent similar contest, see this page for details: [Opensetface]. You will need to agree to the Data Usage Terms on [Opensetface] before downloading the files.


Most of the information described at [Opensetface] is valid for the current contest as well, but be mindful about some important differences:

  • [Opensetface] describes two tasks: face detection and face recognition. This current contest concerns only the face detection task. However, there is a separate contest about face recognition as well, running in parallel to this contest, using the same input data.

  • The scoring metric is different, see below at Scoring for details.

  • The format of the required output is different, see below at Output file and Submission format for details.


Important notes:

  • Use only the images found in the Training folder of the [Opensetface] data access page. This contest uses different images for provisional and final testing than those listed in the Testing and Validation folders of [Opensetface]. Using Opensetface's testing and validation data for training is strictly prohibited. Such usage will be checked in final testing.

  • [Opensetface] gives two versions of annotations for the training data. In this contest version 2 is used (see on the data access page).

Provisional test data
Provisional test data can be downloaded from this AWS S3 bucket:
Bucket name:
Secret access key: 4BMPMw7YTtigL1g5g3P8x9oG04I5L1dZmGcdPQCY

(If you are unfamiliar with AWS S3 technology then this document can help you get started. Note that the document was prepared for a previous image processing contest, but most of its content - like how to set up an AWS account or what are the tools you can use - is relevant in this challenge as well.)

Output file

The detections your algorithm creates must be listed in a single CSV file. This file should contain all the detections your algorithm creates using all image files of the test set, that is all 2600 images found in the AWS bucket referenced above. The file must be named solution.csv and have the following format:



Your solution file may or may not include the above header line. The rest of the lines should specify the bounding boxes your algorithm extracted, one per line.


Sample lines:





The required fields are:

  • ImageId is a string that uniquely identifies the image, corresponds to the file name of the image, including the .jpg extension.

  • FACE_X, FACE_Y, W, H describe a detected bounding box by giving the x and y coordinate of its top left corner, its width and height, respectively. All values are in pixels (real values allowed), x is measured from left to right, y is measured from top to bottom.

  • Confidence is a real number in the [0,...,1] range, higher numbers mean you are more confident that this face is indeed present. See the details of scoring for how this value is used.

Your output file must not contain more than 60 bounding boxes for the same ImageId.

Submission format

This match uses a combination of the "submit data" and "submit code" submission styles. Your submission must be a single ZIP file not larger than 500 MB, with the following content:






   <your code>


, where

  • /solution/solution.csv is the output your algorithm generates on the provisional test set. The format of this file is described above in the Output file section.

  • /code contains a dockerized version of your system that will be used to reproduce your results in a well defined, standardized way. This folder must contain a Dockerfile that will be used to build a docker container that will host your system during final testing. How you organize the rest of the contents of the /code folder is up to you, as long as it satisfies the requirements listed below in the Final testing section.



  • During provisional testing only your solution.csv file will be used for scoring, however the tester tool will verify that your submission file confirms to the required format. This means that at least the /code/Dockerfile must be present from day 1, even if it doesn't describe any meaningful system to be built. However, we recommend that you keep working on the dockerized version of your code as the challenge progresses, especially if you are at or close to a prize winning rank on the provisional leaderboard.

  • You must not submit more often than once every 4 hours. The submission platform does not enforce this limitation, it is your responsibility to be compliant to this limitation. Not observing this rule may lead to disqualification.
  • Make sure that your submission package is smaller than 500 MB. This means that if you use large files (external libraries, data files, pretained model files, etc) that won't fit into this limit, then your docker build process must download these from the net during building. There are several ways to achieve this, e.g. external libraries may be installed from a git repository, data files may be downloaded using wget or curl from Dropbox or Google Drive or any other public file hosting service. In any case always make sure that your build process is carefully tested end to end before you submit your package for final testing.
  • During final testing your last submission file will be used to build your docker container.
  • Make sure that the contents of the /solution and /code folders are in sync, i.e. your solution.csv file contains the exact output of the current version of your code.

  • To speed up the final testing process the contest admins may decide not to build and run the dockerized version of each contestant's submission. It is guaranteed however that if there are N main prizes then at least the top 2*N ranked submissions (based on the provisional leader board at the end of the submission phase) will be final tested.


During scoring your solution.csv file (as contained in your submission file during provisional testing, or generated by your docker container during final testing) will be matched against  expected ground truth data using the following algorithm.


If your solution is invalid (e.g. if the tester tool can't successfully parse its content), you will receive a score of 0.

Otherwise calculate the MAP (mean average precision) value by averaging the AP (average precision) score over several IOU threshold values. The process is explained here and here, also sample code is available on the first referred link. For calculating AP using a given threshold:

  1. Sort the detected bounding boxes (BBs) in decreasing order of confidence. (In case of identical confidence values the order in which they appear in the solution file will be preserved.)

  2. For each solution BB find the best matching one from the set of the ground truth BBs. Loop over the truth BBs, and:

    1. Skip this BB if it was already matched with another solution BB.

    2. Skip this BB if it belongs to a different ImageId than the solution BB.

    3. Otherwise calculate the IOU (Intersection over Union, Jaccard index) of the two BBs.

    4. Note the truth BB which has the highest IOU score if this score is higher than the current threshold. Call this the ‘matching’ BB. (In the extremely rare case when more than one truth BBs have the same maximal IOU score, we use the one having the largest area.)

  3. Now that we know whether for each solution BB we have a matching BB or not, we can calculate the AP score as described on the above referenced pages. We use the version of calculation in which AP is computed as the average of maximum precision at these 11 recall levels: [0.0, 0.1, 0.2, …, 0.9, 1.0]. An offline tester tool is provided that implements scoring. For the exact steps of scoring see its source code.


MAP is calculated as the average of AP scores corresponding to these 10 IOU threshold values: [0.50, 0.55, 0.60, … , 0.95].

Finally your score is calculated as 100 * MAP.


Final testing

This section describes the final testing work flow and the requirements against the /code folder of your submission. You may ignore this section until you decide you start to prepare your system for final testing.


To be able to successfully submit your system for final testing, some familiarity with Docker is required. If you have not used this technology before then you may first check this page and other learning material linked from there. To install docker follow these instructions. In this contest it is very likely that you will work with GPU-accelerated systems, see how to install Nvidia-docker here.


Note that details of this section may change in the first few days of the challenge. We hope to finalize it by the time test data gets available and scoring is opened.

Contents of the /code folder

The /code folder of your submission must contain:

  • All your code (training and inference) that are needed to reproduce your results.

  • A dockerfile (named Dockerfile, without extension) that will be used to build your system.

  • All data files that are needed during training and inference, with the exception of

    • the contest’s own training and testing data. You may assume that the contents of the /Training folder and the training annotations (as described in the Input files section) will be available on the machine where your docker container runs, zip files already unpacked,

    • large data files that can be downloaded automatically either during building or running your docker script.

  • Your trained model file(s). Alternatively your build process may download your model files from the network. Either way, you must make it possible to run inference without having to execute training first.


The tester tool will unpack your submission, and the

nvidia-docker build -t <id> .

command will be used to build your docker image (the final ‘.’ is significant), where <id> is your TopCoder handle.


The build process must run out of the box, i.e. it should download and install all necessary 3rd party dependencies, either download from internet or copy from the unpacked submission all necessary external data files, your model files, etc.


Your container will be started by the

nvidia-docker run -v <local_data_path>:/data:ro -v <local_writable_area_path>:/wdata -it <id>

command (single line), where the -v parameter mounts the contest’s data to the container’s /data folder. This means that all the raw contest data will be available for your container within the /data folder. Note that your container will have read only access to the /data folder. You can store large temporary files in the /wdata folder.

Training and test scripts

Your container must contain a train and test (a.k.a. inference) script having the following specification:

  • <data-folder> should create any data files that your algorithm needs for running later. The supplied <data-folder> parameters point to a folder having training image and annotation data in the same structure as is available for you during the coding phase. The allowed time limit for the script is 3 days. You may assume that the data folder path will be under /data.

  • As its first step must delete the your home made models shipped with your submission.

  • Some algorithms may not need any training at all. It is a valid option to leave empty, but the file must exist nevertheless.

  • Training should be possible to do with working with only raw Opensetface data and publicly available external data. This means that this script should do all the preprocessing and training steps that are necessary to reproduce your complete training work flow.

  • A sample call to your training script (single line):
    ./ /data/training/
    In this case you can assume that the training data looks like this:
         ... all other training .jpg files

  • <data-folder> <output_path> should run your inference code using new, unlabeled data and should generate an output CSV file, as specified by the problem statement. The allowed time limit for the script is 24 hours. The testing data folder contain similar data in the same structure as is available for you during the coding phase. The final testing data will be similar in size and in content to the provisional testing data. You may assume that the data folder path will be under /data.

  • Inference should be possible to do without running training first, i.e. using only your prebuilt model files.

  • It should be possible to execute your inference script multiple times on the same input data or on different input data. You must make sure that these executions don't interfere, each execution leaves your system in a state in which further executions are possible.

  • A sample call to your testing script (single line):
    ./ /data/test/ solution.csv
    In this case you can assume that the testing data looks like this:
         ... all other testing .jpg files


Code requirements

  • Your training and inference scripts must output progress information. This may be as detailed as you wish but at the minimum it should contain the number of images processed so far.

  • Your testing code must process the test and validation data the same way, that is it must not contain any conditional logic based on whether it works on images that you have already downloaded or on unseen data.

Verification workflow

  1. First is run on the provisional test set to verify that the results of your latest online submission can be reproduced. This test run uses your home built models.

  2. Then is run on the final validation dataset, again using your home built models. Your final score is the one that your system achieves in this step.

  3. Next is run on the full training dataset to verify that your training process is reproducible. After the training process finishes, further executions of the test script must use the models generated in this step.

  4. Finally is run on the final validation dataset (or on a subset of that), using the models generated in the previous step, to verify that the results achieved in step #2 above can be reproduced.


A note on reproducibility: we are aware that it is not always possible to reproduce the exact same results. E.g. if you do online training then the difference in the training environments may result in different number of iterations, meaning different models. Also you may have no control over random number generation in certain 3rd party libraries. In any case, the results must be statistically similar, and in case of differences you must have a convincing explanation why the same result can not be reproduced.

Hardware specification

Your docker image will be built and run on a Linux AWS instance, having this configuration:

  • p3.2xlarge

Please see here for the details of this instance type.

General Notes

  • This match is rated.

  • Use the match forum to ask general questions or report problems, but please do not post comments and questions that reveal information about the problem itself or possible solution techniques.

  • Teaming is not allowed. You must develop your solution on your own. Any communication between members beyond what is allowed by the forum rules is strictly forbidden.

  • In this match you may use any programming language and libraries, including commercial solutions, provided Topcoder is able to run it free of any charge. You may also use open source languages and libraries, with the restrictions listed in the next section below. If your solution requires licenses, you must have these licenses and be able to legally install them in a testing VM (see “Requirements to Win a Prize” section). Submissions will be deleted/destroyed after they are confirmed. Topcoder will not purchase licenses to run your code. Prior to submission, please make absolutely sure your submission can be run by Topcoder free of cost, and with all necessary licenses pre-installed in your solution. Topcoder is not required to contact submitters for additional instructions if the code does not run. If we are unable to run your solution due to license problems, including any requirement to download a license, your submission might be rejected. Be sure to contact us right away if you have concerns about this requirement.

  • You may use open source languages and libraries provided they are equally free for your use, use by another competitor, or use by the client. If your solution includes licensed elements (software, data, programming language, etc) make sure that all such elements are covered by licenses that explicitly allow commercial use.

  • If your solution includes licensed software (e.g. commercial software, open source software, etc), you must include the full license agreements with your submission. Include your licenses in a folder labeled “Licenses”. Within the same folder, include a text file labeled “README” that explains the purpose of each licensed software package as it is used in your solution.

  • External data sets and pre-trained models are allowed for use in the competition provided the following are satisfied:

  • The external data and pre-trained models are unencumbered with legal restrictions that conflict with its use in the competition.

  • The data source or data used to train the pre-trained models is defined in the submission description.

Final prizes

In order to receive a final prize, you must do all the following:

  • Achieve a score in the top five according to final system test results. See the "Final testing" section above.

  • Once the final scores are posted and winners are announced, the prize winner candidates have 7 days to submit a report outlining their final algorithm explaining the logic behind and steps to its approach. You will receive a template that helps creating your final report.

  • If you place in a prize winning rank but fail to do any of the above, then you will not receive a prize, and it will be awarded to the contestant with the next best performance who did all of the above.

General marathon match rules apply