This is my project for the image classification challenge as part of the image recognition course at MVA.
For more information on the methods I used, please read the file MVA_RecVis_TD3_report.pdf
- Cropping:
cropper.pyis used to crop an initial dataset into a cropped, cleaner dataset - Training and testing:
data.pydefines the data transforms and augmentationsmodelsis the folder containing all model files.model.pydefines the model used asNet. In practice,model.pyis a symlink to a file in the foldermodels.main.pyis a simple training script with anargparseCLI.evaluate.pyis a simple evaluation script featuring anargparseCLI to evaluate on the test dataset.
- Distributing computations:
computers_nameis the list of the adresses of computers usable for training, one on each line. It is not included here.distrib_train.pyis a more advanced distributed training script using Pytorchtorch.nn.parallelmodule andDistributedDataParallelfunction. It features anargparseCLI, but should be launched using Pytorch'slaunch.pyscript. See alsolaunch.shfor launching.launch.shis a bash script to launch a worker on a specified number of nodes, taking node adresses fromcomputers_name. It spawns a tmux on each node to allow for easily attaching to its shell and easy killing, and logs to the folderslogs/stdoutandlogs/stderrkill.shdoes the inverse oflaunch.sh, it kills workers on a specified number of nodes.
- Visualising features
visualise_features.pyis a script to visualise the outputs of a neural network on the dataset using PCA and t-SNE. It uses the modelNetdefined infeaturizer.py. I used it to visualise the activations of the layer just before classification, in order to understand better the inner workings of my models.featurizer.pydefines the model used for this. Usually a symlink to a model inmodels.TSNE_embeddingsis a folder containing pictures of such embeddings.
workshop.ipynbis a notebook that I used to quickly try different things.MVA_RecVis_TD3_report.pdfis my formal report where I detail the methods I used.