zdaxie / pixpro Goto Github PK
View Code? Open in Web Editor NEWPropagate Yourself: Exploring Pixel-Level Consistency for Unsupervised Visual Representation Learning, CVPR 2021
Home Page: https://arxiv.org/abs/2011.10043
License: MIT License
Propagate Yourself: Exploring Pixel-Level Consistency for Unsupervised Visual Representation Learning, CVPR 2021
Home Page: https://arxiv.org/abs/2011.10043
License: MIT License
The similarity computation is cosine-related function in the paper, but here is torch.bmm, may be such function is not important.
Hi @ancientmooner @zdaxie ,
Thanks for your contribution, but why there need a txt file to load ImageNet? How can I get it?
The pre-training losses are always negative (like -199.03), is that normal?
Can you release the downstream task of semantic segmentation code?
I tried to pretrain the model, it shows "Gradient overflow. Skipping step, loss scaler 0 reducing loss scale to 131072.0", is that right result? Could you show your loss curve?
Hi, thank you for sharing your code!
Do you have any plan to release th code of pixcontrast part?
I've noticed that you normalized the coordinates to the range from 0 to 1. Does this mean the distance threshold should stay the same for absolute coordinates?
Can you release the downstream task of semantic segmentation code?
Hi, thank you for the great work.
I would like to know if anyone has done experiments pre-training with larger Image Size, especially when pre-training for object detection/segmentation tasks ?
Thank you
About your beginning training weight.
Did you use random weight or other's pre-training weight to train your network?
PixPro/contrast/models/PixPro.py
Line 141 in e390d6b
If I set pixpro_transform_layer=2
, it will use Batchnorm between 2 linear layers, but it seems that you didn't convert this batchnorm to SyncBatchNorm.
Thanks for your great work.
Could you please show your loss curve in traing? Or could you let me know the loss value of PixPro at the end of training?
Thank you very much for your work. After reading the code, I have a question.
In the paper, the final loss consists of
But In the Pixpro.py, I just find the
# compute loss
loss = regression_loss(pred_1, proj_2_ng, coord1, coord2, self.pixpro_pos_ratio) \
+ regression_loss(pred_2, proj_1_ng, coord2, coord1, self.pixpro_pos_ratio)
and
loss_instance = self.regression_loss(pred_instance_1, proj_instance_2_ng) + \
self.regression_loss(pred_instance_2, proj_instance_1_ng)
So I wonder where
Any one successfully reproduce the results?
As for the implementation of pre-training backbone and FPNs, I wonder whether feature maps from different levels share the same projection MLP?
Hello, thanks for your great work.
Can you provide additional ablations obtained using different batch size ? (e.g. smaller batch size 512/256, instead of the 1024 reported in paper)
I vary the training batch size but I find that the final result vary a lot.
Hi, zdaxie.
thank you for sharing code.
I have a question about Lars optimizer.
Line 133 in e390d6b
In above code line, I think the correct code as follows:
adaptive_lr = self.trust_coef * param_norm / (grad_norm + weight_decay * param_norm)
What do you think about it ?
Hello, thanks for your great work. Could you please release the checkpoint with instance branch of BYOL(the implementation in code)?
Thanks for open source. What is the function of max_bin_diag?
Could you share the documents obtained from the Pre-Training? Thank you
when using P3-P6 of FPN to do self-supervised learning, how should we set the distance threshold? Setting it to be 0.7 each level or setting to different value on different level?
Hello, thanks for this interesting work.
Here is one question, do you have a plan to release pre-trained models with instance branch?
Thanks.
How long would it take to pretrain the pixpro?
Thank you very much for your work and code sharing. In the Pixpro.py, I found that in "pixpro_instance_loss", 'pred_instance_1' has one more predictor layer than 'proj_instance_1_ng'. I don’t quite understand why this is necessary. I am waiting for your reply. Thank you very much.
if self.pixpro_ins_loss_weight > 0.:
proj_instance_1 = self.projector_instance(feat_1)
pred_instacne_1 = self.predictor(proj_instance_1)
pred_instance_1 = F.normalize(self.avgpool(pred_instacne_1).view(pred_instacne_1.size(0), -1), dim=1)
proj_instance_2 = self.projector_instance(feat_2)
pred_instance_2 = self.predictor(proj_instance_2)
pred_instance_2 = F.normalize(self.avgpool(pred_instance_2).view(pred_instance_2.size(0), -1), dim=1)
# compute key features
with torch.no_grad(): # no gradient to keys
self._momentum_update_key_encoder() # update the key encoder
feat_1_ng = self.encoder_k(im_1) # keys: NxC
proj_1_ng = self.projector_k(feat_1_ng)
proj_1_ng = F.normalize(proj_1_ng, dim=1)
feat_2_ng = self.encoder_k(im_2)
proj_2_ng = self.projector_k(feat_2_ng)
proj_2_ng = F.normalize(proj_2_ng, dim=1)
if self.pixpro_ins_loss_weight > 0.:
proj_instance_1_ng = self.projector_instance_k(feat_1_ng)
proj_instance_1_ng = F.normalize(self.avgpool(proj_instance_1_ng).view(proj_instance_1_ng.size(0), -1),
dim=1)
proj_instance_2_ng = self.projector_instance_k(feat_2_ng)
proj_instance_2_ng = F.normalize(self.avgpool(proj_instance_2_ng).view(proj_instance_2_ng.size(0), -1),
dim=1)
Hi,
Thank you for this amazing repo. I am trying to train a model. However, I am getting below error. It seems like, issue with PIL reader.
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/work/PixPro/contrast/data/dataset.py", line 261, in __getitem__
image = self.loader(path)
File "/work/PixPro/contrast/data/dataset.py", line 219, in default_img_loader
return pil_loader(path)
File "/work/PixPro/contrast/data/dataset.py", line 202, in pil_loader
return img.convert('RGB')
File "/home/users/conda/envs/PixPro/lib/python3.7/site-packages/PIL/Image.py", line 904, in convert
self.load()
File "/home/users/conda/envs/PixPro/lib/python3.7/site-packages/PIL/ImageFile.py", line 228, in load
seek(offset)
ValueError: seek of closed file
I am using dual gpu setup and I have set the parameters accordingly.
Could you please help me?
Thanks
when using instance-level self-supervised learning on FPN, do we need to add loss on each level of FPN or still in C5 ?
Hello,
When I try to run ./tools/pixpro_base_r50_100ep.sh, it crashes with the following error messages. I was wondering if anyone knows how to fix it. Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.