yue-zhongqi / gcm-cf Goto Github PK
View Code? Open in Web Editor NEW[CVPR 2021] Released code for Counterfactual Zero-Shot and Open-Set Visual Recognition
[CVPR 2021] Released code for Counterfactual Zero-Shot and Open-Set Visual Recognition
Dear Authors,
Thank you for the wonderful work. I was trying to replicate the results of the TF-VAEGAN model mentioned in your paper using this code. I am training the TF-VAEGAN model from scratch on the PS2.0 dataset. I am not able to replicate the results mentioned in your paper. Can you suggest to me, how I can replicate the results using the train_tfvaegan_inductive.py
file?
Thank you for your valuable time.
Nice job! Here are my questions about the loss functions in Section 3.4 Counterfactual-Faithful Training.
(1) As I can see, there are three loss functions, i.e., Eq.(6), Eq.(7), and Eq.(8) in the main paper. But the contrastive loss in Eq.(7) and the WGAN loss in Eq.(8) are actually used during the training of "cf.py". Can you explain why the loss function in Eq.(6) is not used in the training procedure?
(2) There are a serise of loss functions for disentangle in "train_tfvaegan_inductive.py", e.g., "zy_disentangle, ys_disentangle, yx_disentangle, ...". But I can't find any explanation in the main paper or usage in the code about these disentangle loss functions. Can you explain the meaning of these disentangle losses and how to use them?
Thanks for your wonderful job
What is the role of qmv.py ,I can finish training process without it , what is it used for?
Hello, in the data set division link you gave(https://www.mpi-inf.mpg.de/departments/computer-vision-and-machine-learning/research/zero-shot-learning/zero-shot-learning-the-good-the-bad-and-the-ugly/ ), I click the link in the page but can't download it.
I've managed to recreate the results on SVHN and other dataset. I got 0.7905 f1 score on SVHN, which is close to the values on the paper. But when I saved the counterfactual images, they are all gray and I can not recreate the images on the paper. I just run the SVHN_cf.script without any extra arguments. Is there anything hyperparameters or arguments I should use to get the same counterfactual images on the paper? Thank you very much!
After reading this wonderful paper and code ,i find why you set enconde_z=10,the dim of z is relate with class number,but you can't know the number of class because it's open-set.i am very confuse.please help me
How would I go about getting AUCs? Any tips? I'd imagine modifying the threshold argument would take a lot of compute time.
What are these two loss functions used for? I don’t seem to mention it in the paper. I don't quite understand its code, so I want to ask its purpose.
I want to change the size of the image to 64*64, but I encountered some problems:
"""
GARBAGE40
Experiment: GARBAGE40-baseline-lamda100
Begin to Run Exp 0...
decreasing_lr: [60, 100, 150]
Training... Epoch = 0
Traceback (most recent call last):
File "D:/a全部文件/科研 竞赛 项目/南京理工研究生项目/新类检测/OSR/基于DNN的OSR方法/Code/复现/gcm-cf-main/gcm-cf-main/osr/lvae_train.py", line 461, in
best_val_loss, best_val_epoch = train(args, lvae)
File "D:/a全部文件/科研 竞赛 项目/南京理工研究生项目/新类检测/OSR/基于DNN的OSR方法/Code/复现/gcm-cf-main/gcm-cf-main/osr/lvae_train.py", line 130, in train
loss, mu, output, output_mu, x_re, rec, kl, ce = lvae.loss(data, target, target_en, next(beta), args.lamda, args)
File "D:\a全部文件\科研 竞赛 项目\南京理工研究生项目\新类检测\OSR\基于DNN的OSR方法\Code\复现\gcm-cf-main\gcm-cf-main\osr\model.py", line 342, in loss
pmu2_2, pvar2_2, pmu2_1, pvar2_1, pmu1_2, pvar1_2, pmu1_1, pvar1_1 = self.lnet(x, y_de, args)
File "D:\a全部文件\科研 竞赛 项目\南京理工研究生项目\新类检测\OSR\基于DNN的OSR方法\Code\复现\gcm-cf-main\gcm-cf-main\osr\model.py", line 243, in lnet
predict = F.log_softmax(self.classifier(latent_y), dim=1)
File "C:\Users\296714435\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\296714435\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\nn\modules\linear.py", line 96, in forward
return F.linear(input, self.weight, self.bias)
File "C:\Users\296714435\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\nn\functional.py", line 1847, in linear
return torch._C._nn.linear(input, weight, bias)
RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling cublasSgemm( handle, opa, opb, m, n, k, &alpha, a, lda, b, ldb, &beta, c, ldc)
** On entry to SGEMM parameter number 10 had an illegal value
"""
Is survae a custom library? What is its main function?
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.