abhimanyudubey / confusion Goto Github PK
View Code? Open in Web Editor NEWCode for the ECCV 2018 paper "Pairwise Confusion for Fine-Grained Visual Classification"
Home Page: https://arxiv.org/abs/1705.08016
Code for the ECCV 2018 paper "Pairwise Confusion for Fine-Grained Visual Classification"
Home Page: https://arxiv.org/abs/1705.08016
Thanks for your great paper and related codes. However, I still met some problems in my own implementation with Keras. How to initialize weights better? I mean that if I use my default setting from your PyTorch codes, the feature map in EntropicConfusion hasn't been normalized, and the Log will get a NAN problem. I think I should add an extra normalization?
In the paper,
Through this loss function, we aim to directly penalize the distance between the
predicted output logits.
So for the PairwiseConfusion, we are using logits? which is the direct output of pytorch models.
But for EntropicConfusion, obviously we should use softmax probabilities, which is obtained by feeding logits through a softmax function.
Am I right?
Thank you
Hello~Could you have implemented this code with pytorch?
Hi, I think I have some problem with my code, so I can not reproduce the result of densenet161 with pytorch.
I use the pretrained Densenet161 to train on CUB200, with standard SGD, linear-decay of learning rate, initial learning rate 0.1, 40k iterate, 32 batch size. My result is 83.38%, and your paper is 84.21%.
And then, I add the pairwiseconfusion to the loss like : loss = criterion(y_, y) + 10* PairwiseConfusion(y_). And the result is 83.58%, and your paper is 86.87%.
Can you help me to reproduce the result? Thank you.
In your implementation of bilinear VGG in caffe, I found out that num_output
for bilinear_layer
is at 8192
. But I do not understand how is it so? Because no of output for this layer should be equal to 512x512
if we take outer product of the preceding layer output with itself.
I think that RPN_PRE_NMS_TOP_N is not per image unless IMS_PER_BATCH = 1. Is it a bug?
Hi,@abhimanyudubey, Thanks for you share, I met some problems when I add pairwise to my network. --confusion '{"fc8_cub200" : 20}' is the parameter I set, where fc8_cub200 is the output of innerproduct. However, my train_loss is in oscillation. I am confused about the parameter --normalize,--agnostic,--entropic.
In conclusion, (1) If I want to apply PC to my own net, True or False should above they be? (2) in add_simplex function of train.py, which code part shows you get the Euclidean Confusion? maybe the simplex7?
Look forward to UR reply?
Hi, When I compiled caffe, the following error occurred. My platform is ubuntu 16.04, cuda 8.0 and cudnn v6.
**CXX/LD -o .build_release/tools/compute_image_mean.bin
.build_release/lib/libcaffe.so: undefined reference to `cufftPlanMany'
.build_release/lib/libcaffe.so: undefined reference to `cufftExecD2Z'
.build_release/lib/libcaffe.so: undefined reference to `cufftExecC2R'
.build_release/lib/libcaffe.so: undefined reference to `cufftExecR2C'
.build_release/lib/libcaffe.so: undefined reference to `cufftExecZ2D'
collect2: error: ld returned 1 exit status**
Thanks for your wonderful code! I apply your code to a plant data set and encounter with nan
easily (after some iterations, about 1k iteration). Settings are as follows:
a) category is about 3k
b) lambda=140
c) softmaxwithloss
d) add an extra softmax layer(normalize to 0~1), followed with pair confusion
e) batchsize=24, iter_size=6
f) lr_policy is changed to multistep
In the initial iteration, loss seems to be decreasing. I have tried decay the lr.
Could you please give some suggestions about it?
Hi,
there are two losses (PairwiseConfusion and EntropicConfusion) defined in pytorch (https://github.com/abhimanyudubey/confusion/blob/master/confusion_pytorch/__init__.py), but the names confuse me.
which one should I use?
from the paper, EQ(5) is Euclidean Confusion, is this refer to PairwiseConfusion?
Where can I find the entropy confusion from the paper?
I tried to implement your work of models/cub/bilinear_vgg/.
After I executed the command ./train.py .... --confusion '{"l1" : 1, "l2": 0.005}'
--entropic, I got the model.prototxt. However, I cannot see the difference between this prototxt with the original one.
Did I do something wrong? Could you please tell me how to implement the bilinear pooling experiment of your paper? Thank you very much.
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.