ku21fan / STR-Fewer-Labels

Scene Text Recognition (STR) methods trained with fewer real labels (CVPR 2021)
MIT License
174 stars 27 forks source link

instance discrimination task #1

Closed CuongNN218 closed 3 years ago

CuongNN218 commented 3 years ago

You mentioned ''we use an instance discrimination task as a pretext task" in your paper. I'm really confuse which task should be used. As I understand, you feed text images to encoder and train MOCO with only Resnet and then frezze resnet and then train with Bilstm and attention. beside that, I'm confuse with the idea that you train full TRBA with moco and I don't know the next step of 2 stages moco training methods. Feel free to correct me if i misunderstood.

ku21fan commented 3 years ago

Hello,

  1. pretrain ResNet part of TRBA with MoCo (use pretrain.py). You can check the instance discrimination task from Algorithm1 in MoCo paper or just check our code self_supervised.py
  2. train TRBA with initialization by the model pretrained in 1 (only ResNet part, use train.py).

We just uploaded our code. You can check the process for MoCo, in model.py, self_supervised.py, pretrain.py, train.py.

Hope it helps.

Best