Skip to content

sanjeevg15/context-prediction-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Context Prediction Pytorch

PyTorch Implementation of Unsupervised Visual Representation Learning by Context Prediction by Carl Doersch, et al.

This repository allows you to train any "feature extractor" on any image dataset in a self-supervised fashion using the Context Prediction methodology described in the above seminal research paper.

A feature extractor is used to convert images to meaningfully rich vector embeddings. A classifier is used to classify these embeddings into one of 8 categories. After the training, the classifier is discarded and the feature extractor can be used for downstream tasks.

Usage Example:

training_args={"optimizer": Adam, "num_epochs": 1000, "batch_size": 256, "patch_size": 40, "patches_gap": 7}
trainer = ContextPredictionTrainer(training_args)
trainer.train(feature_extractor=feature_extractor, classifier=classifier, dataset=caltech101_dataset, training_args=training_args, learning_rate=3e-4)

About

PyTorch Implementation of "Unsupervised Visual Representation Learning by Context Prediction"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages