Customizable Checkpoint Callbacks, Batch Shuffling and More
Fixed download speed for image datasets.
`lightly-magic` can now be used with `trainer.max_epochs=0`.
Fixed the pytorch-lightning warning: "Passing a ModelCheckpoint instance to Trainer(checkpoint_callbacks=...) is deprecated since v1.1 and will no longer be supported in v1.3."
Customizable Checkpoint Callback
Checkpoint callbacks are now customizable (even from the command-line):
bash
save the 5 best models
lightly-train input_dir='data/' checkpoint_callback.save_top_k=5
don't save the model of the last epoch
lightly-train input_dir='data/' checkpoint_callback.save_last=False
Batch Shuffling
Added [batch shuffling to MoCo](https://github.com/facebookresearch/moco/blob/master/moco/builder.py) and `SplitBatchNorm` to simulate multi-gpu behaviour.
Image Resizing
Images can be resized before uploading them to the web-app:
bash
no resizing (default)
lightly-upload input_dir='data/' dataset_id='XYZ' token='123' resize=-1
resize such that shortest edge of the image is 128
lightly-upload input_dir='data/' dataset_id='XYZ' token='123' resize=128
resize images to (128, 128)
lightly-upload input_dir='data/' dataset_id='XYZ' token='123' resize=[128,128]
Models
- MoCo: [Momentum Contrast for Unsupervised Visual Representation Learning, 2019](https://arxiv.org/abs/1911.05722)
- SimCLR: [A Simple Framework for Contrastive Learning of Visual Representations, 2020](https://arxiv.org/abs/2002.05709)