Skip to content

uoguelph-mlrg/fly_re_identification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Classification and Re-Identification of Fruit Fly Individuals Across Days with Convolutional Neural Networks

This code was used in the WACV publication: "Classification and Re-Identification of Fruit Fly Individuals Across Days with Convolutional Neural Networks" by Nihal Murali, Jonathan Schneider, Joel D. Levine, and Graham W. Taylor.

To cite our work, please use the following bibtex entry.

@article{murali2019classification,
  Author = {Murali, Nihal and Schneider, Jonathan and Levine, Joel D. and Taylor, Graham W.},
  Title = {Classification and Re-Identification of Fruit Fly Individuals Across Days with Convolutional Neural Networks},
  Booktitle = {IEEE Winter Conference on Applications of Computer Vision (WACV)},
  Year = {2016}
}

Data can be downloaded from: https://doi.org/10.5683/SP2/JP4WDF

Example use-cases:

  1. To train a resnet18 model on replicate-1 (present in pic_dir) using 'random cropping + masking' data augmentation, run:
python train_network.py --descriptor test --pic_dir </path/to/3DayData> --replicate 1 -d r_crop_mask --log_path </path/to/logs> --chkpoint_path </path/to/checkpoints> 

Note: The output is logged in the 'log_path' directory, and checkpoints are saved in the path given by 'chkpoint_path', and the name which is used in both cases is given by the 'descriptor' you specify

  1. To test the above network on day-2 fly images of replicate-1, run:
python test_network.py --pic_dir </path/to/3DayData> --replicate 1 --day Day2 --chkpoint_path </path/to/checkpoints> --chkpoint_name test
  1. To perform double day training (DDT) using 'random masking' data augmentation, run:
python train_network.py --descriptor test --pic_dir </path/to/3DayData> --replicate 1 --ddt true -d r_mask --log_path </path/to/logs> --chkpoint_path </path/to/checkpoints> 
  1. To train domain adversarial networks on replicate-3 without any data augmentation, run:
python dann_train.py --descriptor test --pic_dir </path/to/3DayData> --replicate 3 --log_path </path/to/logs> --chkpoint_path </path/to/checkpoints>
  1. To test the above trained domain adversarial network on Day-3 of replicate-3, run:
python dann_test.py --pic_dir </path/to/3DayData> --replicate 3 --day Day3 --chkpoint_path </path/to/checkpoints> --chkpoint_name test

You may be interested in our other related work, which makes use of the same dataset: Can Drosophila melanogaster tell who’s who? by Jonathan Schneider, Nihal Murali, Graham W. Taylor, and Joel D. Levine.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages