Skip to content

Pytorch lightning template for metric learning tasks. Dataset used: Stanford Online Data Products

Notifications You must be signed in to change notification settings

ArtemVerbov/Metric-Learning-X-Lightning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metric-learning template

All experiments are tracked with clearml: https://clear.ml/docs/latest/docs/

Environment created with poetry: https://python-poetry.org/docs/

To install dependeces: poetry install

There are two options to run training in this repository:

1. Defualt with TripletMarginLoss and TripletMarginMiner: poetry run python3.11 -m src.train 
2. With ArcFaceLoss: poetry run python3.11 -m src.train lightning_module=ArcFaceLoss
  1. Setup ClearML: clearml-init

  2. Migrate dataset to ClearML: make migrate_dataset

Dataset information

Dataset used: Stanford Online Products

More info: https://paperswithcode.com/dataset/stanford-online-products

Metrics traced with clearml:

  1. Training and test with TripletMarginLoss
  2. Training and test with ArcFaceLoss

Test data projection of high dimension embedding space to two dimensions

With TripletLoss:

alt text

With ArcFaceLoss:

alt text

About

Pytorch lightning template for metric learning tasks. Dataset used: Stanford Online Data Products

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published