• Stars
    star
    481
  • Rank 90,760 (Top 2 %)
  • Language
    Python
  • Created almost 5 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A PyTorch implementation of SimCLR based on ICML 2020 paper "A Simple Framework for Contrastive Learning of Visual Representations"

SimCLR

A PyTorch implementation of SimCLR based on ICML 2020 paper A Simple Framework for Contrastive Learning of Visual Representations.

Network Architecture image from the paper

Requirements

conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
  • thop
pip install thop

Dataset

CIFAR10 dataset is used in this repo, the dataset will be downloaded into data directory by PyTorch automatically.

Usage

Train SimCLR

python main.py --batch_size 1024 --epochs 1000 
optional arguments:
--feature_dim                 Feature dim for latent vector [default value is 128]
--temperature                 Temperature used in softmax [default value is 0.5]
--k                           Top k most similar images used to predict the label [default value is 200]
--batch_size                  Number of images in each mini-batch [default value is 512]
--epochs                      Number of sweeps over the dataset to train [default value is 500]

Linear Evaluation

python linear.py --batch_size 1024 --epochs 200 
optional arguments:
--model_path                  The pretrained model path [default value is 'results/128_0.5_200_512_500_model.pth']
--batch_size                  Number of images in each mini-batch [default value is 512]
--epochs                      Number of sweeps over the dataset to train [default value is 100]

Results

There are some difference between this implementation and official implementation, the model (ResNet50) is trained on one NVIDIA TESLA V100(32G) GPU:

  1. No Gaussian blur used;
  2. Adam optimizer with learning rate 1e-3 is used to replace LARS optimizer;
  3. No Linear learning rate scaling used;
  4. No Linear Warmup and CosineLR Schedule used.
Evaluation Protocol Params (M) FLOPs (G) Feature Dim Batch Size Epoch Num τ K Top1 Acc % Top5 Acc % Download
KNN 24.62 1.31 128 512 500 0.5 200 89.1 99.6 model | gc5k
Linear 23.52 1.30 - 512 100 - - 92.0 99.8 model | f7j2

More Repositories

1

SRGAN

A PyTorch implementation of SRGAN based on CVPR 2017 paper "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network"
Python
981
star
2

ESPCN

A PyTorch implementation of ESPCN based on CVPR 2016 paper "Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network"
Python
472
star
3

CapsNet

A PyTorch implementation of CapsNet based on NIPS 2017 paper "Dynamic Routing Between Capsules"
Python
151
star
4

SlamBook

Learn 视觉slam十四讲
C++
138
star
5

SEGAN

A PyTorch implementation of SEGAN based on INTERSPEECH 2017 paper "SEGAN: Speech Enhancement Generative Adversarial Network"
Python
117
star
6

CGD

A PyTorch implementation of CGD based on the paper "Combination of Multiple Global Descriptors for Image Retrieval"
Python
102
star
7

ImageDeblurring

A Keras implementation of image deblurring based on ICCV 2017 paper "Deep Generative Filter for motion deblurring"
Python
84
star
8

R2Plus1D-C3D

A PyTorch implementation of R2Plus1D and C3D based on CVPR 2017 paper "A Closer Look at Spatiotemporal Convolutions for Action Recognition" and CVPR 2014 paper "Learning Spatiotemporal Features with 3D Convolutional Networks"
Python
58
star
9

DGCNN

A PyTorch implementation of DGCNN based on AAAI 2018 paper "An End-to-End Deep Learning Architecture for Graph Classification"
Python
56
star
10

CarLaneDetection

车道线检测
Python
54
star
11

CCCapsNet

A PyTorch implementation of Compositional Coding Capsule Network based on PRL 2022 paper "Compositional Coding Capsule Network with K-Means Routing for Text Classification"
Python
48
star
12

DrawingBoard

仿画图板——Android
Java
47
star
13

GradCAM

A PyTorch implementation of Grad-CAM based on ICCV 2017 paper "Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization"
Python
46
star
14

Restormer

A PyTorch implementation of Restormer based on CVPR 2022 paper "Restormer: Efficient Transformer for High-Resolution Image Restoration"
Python
44
star
15

CapsuleLayer

PyTorch Capsule Layer
Python
30
star
16

MoCo

A PyTorch implementation of MoCo based on CVPR 2020 paper "Momentum Contrast for Unsupervised Visual Representation Learning"
Python
30
star
17

GatedSCNN

A PyTorch implementation of Gated-SCNN based on ICCV 2019 paper "Gated-SCNN: Gated Shape CNNs for Semantic Segmentation"
Python
22
star
18

EMANet

A PyTorch implementation of EMANet based on ICCV 2019 paper "Expectation-Maximization Attention Networks for Semantic Segmentation"
Python
17
star
19

DeepMask

A Keras implementation of DeepMask based on NIPS 2015 paper "Learning to Segment Object Candidates"
Python
15
star
20

FastSCNN

A PyTorch implementation of Fast-SCNN based on BMVC 2019 paper "Fast-SCNN: Fast Semantic Segmentation Network"
Python
13
star
21

NPID

A PyTorch implementation of NPID based on CVPR 2018 paper "Unsupervised Feature Learning via Non-Parametric Instance Discrimination"
Python
13
star
22

PSCapsNet

A PyTorch implementation of Parameter-sharing Capsule Network based on the paper "Evaluating Generalization Ability of Convolutional Neural Networks and Capsule Networks for Image Classification via Top-2 Classification"
Python
13
star
23

ACRNet

A PyTorch implementation of ACRNet based on ICME 2023 paper "Weakly-supervised Temporal Action Localization with Adaptive Clustering and Refining Network"
Python
13
star
24

CARAFE

A PyTorch implementation of CARAFE based on ICCV 2019 paper “CARAFE: Content-Aware ReAssembly of FEatures”
Cuda
12
star
25

DANet

A PyTorch implementation of DANet based on CVPR 2019 paper "Dual Attention Network for Scene Segmentation"
Python
11
star
26

SimSiam

A PyTorch implementation of SimSiam based on CVPR 2021 paper "Exploring Simple Siamese Representation Learning"
Python
10
star
27

ProxyAnchor

A PyTorch implementation of Proxy Anchor Loss based on CVPR 2020 paper "Proxy Anchor Loss for Deep Metric Learning"
Python
9
star
28

Tutorials

This repertory contains some resources which I learn new technologies
DIGITAL Command Language
9
star
29

SlowFast

A PyTorch implementation of SlowFast based on ICCV 2019 paper "SlowFast Networks for Video Recognition"
Python
8
star
30

NormSoftmax

A PyTorch implementation of NormSoftmax based on BMVC 2019 paper "Classification is a Strong Baseline for Deep Metric Learning"
Python
8
star
31

DSTLDetection

DSTL remote sensing images detection
Python
7
star
32

MCDet

PyTorch Multiple Channel MMDetection Library, support multiple channel image loading and processing.
Python
6
star
33

DaCo

A PyTorch implementation of DaCo based on APIN 2023 paper "DaCo: Domain-Agnostic Contrastive Learning for Visual Place Recognition"
Python
6
star
34

Indoor

一个类似微信的android app,并且实现了多种功能扩展,需要在face++,高德地图,Bmob平台注册账号并作相关配置
Java
5
star
35

MCA

A PyTorch implementation of MCA based on PRICAI 2022 paper "Weakly-supervised Temporal Action Localization with Multi-head Cross-modal Attention"
Python
4
star
36

GPUView

A NVIDIA GPU monitor web tool
Python
4
star
37

DREML

A PyTorch implementation of DREML based on ECCV 2018 paper "Deep Randomized Ensembles for Metric Learning"
Python
3
star
38

ACNet

A PyTorch implementation of ACNet based on TCSVT 2023 paper "ACNet: Approaching-and-Centralizing Network for Zero-Shot Sketch-Based Image Retrieval"
Python
3
star
39

RCDNet

A PyTorch implementation of RCDNet based on CVPR 2020 paper "A Model-driven Deep Neural Network for Single Image Rain Removal"
Python
3
star
40

ClipPrompt

A PyTorch implementation of ClipPrompt based on CVPR 2023 paper "CLIP for All Things Zero-Shot Sketch-Based Image Retrieval, Fine-Grained or Not"
Python
3
star
41

Templates

Some specific domains' templates, including Android App, Deep Learning and Web.
CSS
3
star
42

UM

A PyTorch implementation of UM based on AAAI 2021 paper "Weakly-supervised Temporal Action Localization by Uncertainty Modeling"
Python
2
star
43

Near

"附近"APP,利用AR进行附近场所的导航
Java
2
star
44

EGFF

A PyTorch implementation of EGFF based on NPL 2022 paper "Energy-Guided Feature Fusion for Zero-Shot Sketch-Based Image Retrieval"
Python
2
star
45

CycleGAN

A PyTorch implementation of CycleGAN based on ICCV 2017 paper "Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks"
Python
2
star
46

IDIP

A PyTorch implementation of IDIP based on ECAI 2023 paper "Instance-aware Diffusion Implicit Process for Box-based Instance Segmentation"
Python
2
star
47

Olist

A Python implementation of our database project
HTML
1
star
48

Living

一个房屋推荐与观览的Android APP,具有良好的界面设计与简单的操作
Java
1
star
49

RSC

A PyTorch implementation of RSC based on MMM 2023 paper "Weakly-supervised Temporal Action Localization with Regional Similarity Consistency"
Python
1
star
50

FlappyBird

FlappyBird implemented by Haskell
Haskell
1
star