The Kaggle page of the competition can be found here: https://www.kaggle.com/c/kuzushiji-recognition.
This is the recommended environment, but it may work also with other versions.
- Python 3.6.8 (≥ 3.6 required)
- Tensorflow 1.14.0
- Clone/download the repository
- Install the required packages:
pip install -r requirements.txt
- Modify configuration parameters as described in next section.
To evaluate the models follow this steps:
-
Download the Kaggle dataset from this page (about 7 GB), create a folder with the following structure:
repo_folder/ ├── datasets/ │ └── kaggle/ │ ├── testing/ │ │ └── images │ └── training/ │ └── images
Decompress
test_images.zip
and place all the images intesting/images/
. Place train images intraining/images
.
Insert the following files into the datasets/kaggle
folder:
image_labels_map.csv
(i.e.train.csv
)sample_submission.csv
unicode_translation.csv
-
Adjust configuration in
networks/configuration/params_model_CenterNet.json
. Use theevaluate
parameters to print metrics. Detector and classifier have separate configurations. To print metrics setevaluate
totrue
, leaving the other parameters to false. You can find a list of prepared JSON in here. You may adjust the batch size via thebatch_size_predict
parameter. -
Create a folder in
networks/experiments
with the following structure:experiments/ ├── run_name ├── run_name_2/ │ └── weights ├── run_name_3/ │ └── weights
-
Download the desired weights from GDrive. Place the detector weights inside
run_name_2/weigths/
and the classifier weights inrun_name_3/weights/
-
Weights file are named as
weights.11-0.13.hdf5
. Here 11 is the epoch number.- Set this number in
initial_epoch
parameter inside the JSON file for both models - Set the parameter
run_id
to the chosen 'run_name' - Set
restore_weights
totrue
for both models.
- Set this number in
-
Run program with
python3 __centernet__.py
Use the same configuration, setting train
parameter to true. restore_weights
can be set to true, to
continue training from previous weights. In this case training will restart from specified initial
epoch. Otherwise set it to false
and set initial_epoch
to 0, to restart. To make new experiments
without overwriting existing weights, just change the run_id
parameter: a new experiment folder will be created.