xh-liu / HydraPlus-Net

244 stars 65 forks source link

Questions about the attribute recognition #3

Closed ccJia closed 6 years ago

ccJia commented 6 years ago

Hi Liu,
I tried to duplicate your paper, but I met some questions about the attribute recognition. My net is composed of "res-net" and a "SigmoidCrossEntropyLoss" layer. And the attributes "trousers" and "Age 18-60" occupy a big proportion in "PA-100K" dataset. And it would lead a phenomenon that when I enter a part of a picture the net could also give the labels include "trousers" and "Age 18-60"(I just want a single attribute ). Could you give me some advice to eliminate these distractions? Thank you.

xh-liu commented 6 years ago

Thank you for your question! It is a common phenomenon that the network tends to be affected by majority labels in classification. To avoid the effect of it we used a weighted sigmoid cross entropy loss, following previous work. For example, if the positive ratio is too large for attribute "trousers", we lower that loss penalty for positive samples and use higher loss weight for negative attributes. The formulation of the loss function can be found in the paper.

ccJia commented 6 years ago

Thank you for your reply. I'll try this method .^-^

JohnHush commented 6 years ago

@ccJia hey, dude, are you re implementing the paper in Caffe? lol:)

ccJia commented 6 years ago

@JohnHush Yes , I am implementing the paper. And I just finished the attribute extracting . I want add the attention net in it .

JohnHush commented 6 years ago

@ccJia me, too. I'm wondering how to add attention in the M-NET, need to build new layer?? do you ha ve some suggestion?

ccJia commented 6 years ago

@JohnHush We stand on the same starting line. I just asked my friend about this. ^-^ If there is any good idea, I will contact you .

JohnHush commented 6 years ago

@ccJia that's cool, recently I've implemented DeepMAR, I supposed it's basically the same as M-NET without Attention, keep in touch

Li1991 commented 6 years ago

Hi, have you re-implemented this paper? I am doubt about how to make use of attention. Can you give some suggestions? Thank you. @ccJia

kclch commented 6 years ago

@JohnHush Hi, may you have already reproduced DeepMar? I have been studying it recently. Can you share your results?

JohnHush commented 6 years ago

@kclch ,hi, yes i have reproduced DeepMar, just follow the instruction in the paper"Multi-attribute Learning for Pedestrian Attribute Recognition in Surveillance Scenarios" . And you could modify the base net by yourself, like transfer to ResNet or something else, and replace the last layer to multi task layer, and I have used the dataset published by @xh-liu in this paper, so grateful. I hope it helps

kclch commented 6 years ago

@JohnHush Can you share your entire program with me? I will be very grateful to you.

JohnHush commented 6 years ago

@kclch i've implemented in caffe, you could look into this directory:

kclch commented 6 years ago

multilabel prototxt And I can't find the "multilabel.prototxt" file

kclch commented 6 years ago

@JohnHush Can you provide the test code, thank you