Skip to content
/ IJCB2017 Public

Unconstrained Face Detection and Open Set Recognition Challenge in Darknet

License

Notifications You must be signed in to change notification settings

cezs/IJCB2017

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IJCB2017

This repository contains:

  • Various network architectures and configurations as used in training, inference and validation (see cfg direcotry)
  • Scripts for preparing dataset configurations files required by Darknet framework (see data and protocol directories containing the generated files)
  • Spreadsheet for calculating various parameters of network (see spreadsheets)
  • Score files used in evaluation of accuracy of trained network weights (see results, valid and recall directories)

Download

First register at challenge’s webpage. The download page is located under following link.

After acquiring username and password

nohup wget -c --user=<username> --password=<password> <received_link>/training_{1..11}.zip -P <target_dir>
nohup wget -c --user=<username> --password=<password> <received_link>/validation_{1..6}.zip -P <target_dir>

Note: all together datasets weight >75 GB, so it might take a while to download it from university servers.

Unpack

Unpack and log any unpacking errors with the following command:

find -name 'training_*.zip' -exec sh -c 'unzip -d "${1%.*}" "$1"' _ {} \; > unzip.log 2>&1

Remove Extraneous Bytes from Images

You are very likely to meet with problems when working directly on images due to extraneous bytes in in some of them. In order to get rid of the reported errors use the following command:

mogrify -set comment 'Extraneous bytes removed' *.jpg

Prepare Dataset for Darknet YOLO

If required resize the dataset (note: it might take a while)

convert "./training/*.jpg[576x]" -set filename:base "%[base]" "./training_resized/%[filename:base].jpg"

where 576 is width of an image, and height is scaled accordingly to keep aspect ratio of the image. However, you might skip this step as Darknet YOLO already contains crop layer.

If required use,

file <image>

to find the current dimensions of an image.

Change use_resized_dataset to True in cs_prepare_uccs.py in order to use resized dataset.

Now run the following script

./cs_regenerate.sh

This script generates the following files

ijcb2017.data
contains number of classes and necessary paths
ijcb2017.labels
class numbers fed to ijcb2017.data
ijcb2017.names
class names fed to ijcb2017.data
ijcb2017.train.list
list of image files selected for training
ijcb2017.valid.list
list of image files selected for validation
training/*.txt
individual file annotation for each image containing class, x, y, width and height parameters of bounding box
validation/*.txt
individual file for each image containing class, x, y, width and height parameters of bounding box

In order to prepare a custom dataset, please see the cs_prepare_uccs script help.

usage: cs_prepare_uccs.py [-h] [-a] [-b] [-c] [-d] [-e] [-f]
                                         [-g] [-i] [-j]

Unconstrained Face Detection and Open Set RecognitionChallenge in Darknet

optional arguments:
  -h, --help            show this help message and exit
  -a, --resized_dataset
                        Use resized dataset
  -b, --original_classes
                        Use original classes
  -c, --training_list   Create Darknet list for training
  -d, --training_annotations
                        Create Darknet annotations for training
  -e, --validation_list
                        Create Darknet list for validation
  -f, --validation_annotations
                        Create Darknet annotations for validation
  -g, --labels_file     Create labels file
  -i, --names_file      Create names file
  -j, --data_cfg_file   Create data configuration file

Scripts

Other provided scripts include:

cs_prepare_uccs.py
Convert dataset to format required by Darknet framework
cs_darknet_collect_loss.py
Parse training log file and plot loss graph
cs_darknet_recall_plot.py
Parse training log file and plot recall graph
cs_darknet_valid_plot.py
Parse training log file and plot validation graph
cs_prepare_score_file.py
Convert score file generated with Darknet framework to the format used in IJCB2017 challenge
cs_rescale_bboxes_in_csv.py
Re-scale bounding boxes in csv to have size relative to image dimensions
cs_darknet_run_detection.sh
Run Darknet’s detection using configuration files for IJCB2017 challenge
cs_darknet_train.sh
Run Darknet’s training using configuration files for IJCB2017 challenge
cs_regenerate.sh
Generate all required configuration files

License

This is free and unencumbered software released into the public domain. For more information, please refer to the LICENSE file.

About

Unconstrained Face Detection and Open Set Recognition Challenge in Darknet

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages