ChaoFan96 / GaitPart

Temporal part-based model for gait recognition.
61 stars 6 forks source link

Issues about `layers.py` #11

Closed gosiqueira closed 3 years ago

gosiqueira commented 3 years ago

Hello, I have some issues about your available implementation of the custom layers for GaitPart. From line 47 to line 54:

  # MTB1
  conv3x3 = nn.Sequential(
          BasicConv1d(in_channels, hidden_dim, 3, padding=1), 
          nn.LeakyReLU(inplace=True), 
          BasicConv1d(hidden_dim, in_channels, 3, padding=1))
  self.conv1d3x3 = clones(conv3x3, part_num)
  self.avg_pool3x3 = nn.AvgPool1d(5, stride=1, padding=2)
  self.max_pool3x3 = nn.MaxPool1d(5, stride=1, padding=2)

Is this snippet correct? I mean, wasn't it supposed to be MTB2 and the layers use 2D versions instead of 1D version (e.g nn.Conv2D instead of nn.Conv1D)?

ChaoFan96 commented 3 years ago

Hi, I think there would be no bugs in layer.py since the reported results can be accurately reproduced by this code. Beside, estimating the size of input and output tensors may help your issues, and any further questions are welcome.

gosiqueira commented 3 years ago

Thank you. I'll do as suggested.

yangyangkiki commented 3 years ago

hi author, what the meaning of [p, n, c, s] in https://github.com/ChaoFan96/GaitPart/blob/master/layers.py#L60 ?

ChaoFan96 commented 3 years ago

hi author, what the meaning of [p, n, c, s] in https://github.com/ChaoFan96/GaitPart/blob/master/layers.py#L60 ?

hello,p->parts num, n -> batch size, c -> channels, s -> sequence dimension

ChaoFan96 commented 3 years ago

hi author, what the meaning of [p, n, c, s] in https://github.com/ChaoFan96/GaitPart/blob/master/layers.py#L60 ?

hello,p->parts num, n -> batch size, c -> channels, s -> sequence dimension

Ok, Thank you. One more concern: Where are H and W dimensions?

In fact, after TP (temporal pooling) and HP (horizontal pooling) operations, the H and W dimensions would be concentrated to parts numbers, and you can find out it by checking both the paper and code.

ChaoFan96 commented 3 years ago

Hi, the OpenGait is released now! ( https://github.com/ShiqiYu/OpenGait ) This project not only contains the full code of gaitpart but also reproduces several SOTA models of gait recognition. Enjoy it and any questions or suggestions are welcome!