Official repository of the Project of the VISUM Summer School 2022.
First, you should create a SSH key for GitHub. You can go to the official GitHub tutorial here.
Then, to clone this repository you have to open a Terminal and run the following command:
$ git clone [email protected]:visum-summerschool/visum-competition2022.gitBefore training the models, we must be sure that the database structure is built. To download the data and build the structure, run the following command.
$ cd visum-competition2022
$ bash download_data.sh$ python -m venv venv
$ source venv/bin/activateTo intall the minimum requirements you just need to run the following
$ pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
$ pip install -U albumentations
$ pip install torchinfo
$ pip install tqdm
$ pip install tensorboard
$ pip install -U cython
$ pip install pycocotoolsTo train the baseline model, you have to run the following command (please be sure that your current directory is the root directory of the repository):
$ python code/model_train.pyThis command has several constant variables you can change:
BATCH_SIZE - the batch size for the DataLoader
NUM_EPOCHS - the number of epochs for the trainin
IMG_SIZE - the image size you will use (H, W)
VAL_MAP_FREQ - the frequency you want the training loop to print the mAP values
To do this, you can go to model_utilities.py and edit the LoggiBarcodeDetectionModel.
If you want to check and visualise some of you results on validation (or training) you can run the following command:
$ python code/plot_results.pyAfter the training of your models you have to create a submission file. This file will be .ZIP file containing: 1) the code/ directory, the results/models/visum2022.pt directory, and the Dockerfile. Be sure that you fill the requirement needs of your Dockerfile, and the run the following command:
$ bash create_submission_file.sh