Skip to content

salil-gtm/emlov3_assignment_5

Repository files navigation

EMLOv3 | Assignment 5

pytorch lightning hydra black

Adamantium

The name is inspired by the metal alloy which is bonded to the character Wolverine's skeleton and claws.

Adamantium is a custom python package which currently supports:

  • Usage of any model available in TIMM for training & evalution on CIFAR10 dataset.
  • VIT model for training, evaluation & inference on Cats-Dogs dataset.

All functionalities can be controlled by hydra configs.

Using Dev Container

  1. Clone the repository.
git clone https://github.com/salil-gtm/emlov3_assignment_5.git
  1. Open the repo in VS Code.
cd emlov3_assignment_5
code .
  1. Install the Dev Container Extension in VS Code.

  2. Use Command Palette > Dev Container: Build and Open in Container.

This way you will be able to use the dev container for development with all necessary packages installed.

DVC Setup

  1. To track the data folder using DVC, run the following command:
dvc add data
  1. To add the data folder to remote storage, run the following command:
dvc remote add -d local ../dvc_storage
  1. To push the data folder to remote storage, run the following command:
dvc push -r local
  1. To pull the data folder from remote storage, run the following command:
dvc pull -r local

Training & Evaluation

  1. To train the model, run the following command:
adamantium_train data.num_workers=8 experiment=cat_dog
  1. To evaluate the model, run the following command:
adamantium_eval data.num_workers=8 experiment=cat_dog

Note: The above commands will run the training & evaluation using the default config file.

Inference

To run inference on a single image, run the following command:

adamantium_infer experiment=cat_dog_infer

Output includes the class probabilities for the image:

{'cat': 0.29665568470954895, 'dog': 0.7033442854881287}

Note: The above command will run inference on the image mentioned in the config file.

Past Documentation

Author

  • Salil Gautam

Releases

No releases published

Packages

 
 
 

Languages