Hey i am new to github so if the thread is not conforming to rules feel free to take it down.
i am reimplementing in a very simplified way your work, i love your work but am very new to machine learning, i'm having a hard time understanding the reason why the reid branch seems to overfit immediatly when training on mot17, prw, cuhksysu and part of caltech pedestrian, while training loss seems to decrease in normal ways.
I have tought of some motivations:
1)I have less data than you so the model overfits on reid
2)I am doing a simplified augmentation with respect to your work, no rotations, no cropping, so this means again I have less data, or at least less variation in my datasets
3)I have messed up in the id loss, but i have almost copy-pasted your loss functions so :)
4)The model i'm using is a bit different and maybe too simple for the task (always been taught simpler->less overfitting, anyway i am using bilinear interpolation for upsampling instead of inverse convolutions because i wasn't able to eliminate checkboard effect)
5)the validation code is badly implemented, but i have tried to validate on training set and the results where consistent with training loss
6)i messed up something i am not able to understand
I am posting here the colab notebook in wich i am reimplementing your model, if you have some spare time and want to help me it would be great, anyway great job with online tracking!
Also if my code is correct, i am loading in the model section the pretraing on crowdhuman, and i have modified they datasets to have non overlapping ids.
Here's my colab, google limits the numer of downloads of the datasets, anyway it should run without errors, if not, sorry :)
Hey i am new to github so if the thread is not conforming to rules feel free to take it down.
i am reimplementing in a very simplified way your work, i love your work but am very new to machine learning, i'm having a hard time understanding the reason why the reid branch seems to overfit immediatly when training on mot17, prw, cuhksysu and part of caltech pedestrian, while training loss seems to decrease in normal ways. I have tought of some motivations:
1)I have less data than you so the model overfits on reid 2)I am doing a simplified augmentation with respect to your work, no rotations, no cropping, so this means again I have less data, or at least less variation in my datasets 3)I have messed up in the id loss, but i have almost copy-pasted your loss functions so :) 4)The model i'm using is a bit different and maybe too simple for the task (always been taught simpler->less overfitting, anyway i am using bilinear interpolation for upsampling instead of inverse convolutions because i wasn't able to eliminate checkboard effect) 5)the validation code is badly implemented, but i have tried to validate on training set and the results where consistent with training loss 6)i messed up something i am not able to understand
I am posting here the colab notebook in wich i am reimplementing your model, if you have some spare time and want to help me it would be great, anyway great job with online tracking!
Also if my code is correct, i am loading in the model section the pretraing on crowdhuman, and i have modified they datasets to have non overlapping ids.
Here's my colab, google limits the numer of downloads of the datasets, anyway it should run without errors, if not, sorry :)
--edited--
Oh i post here the id loss i am using:
class IdLoss(nn.Module): def init(self,n_id): super(IdLoss, self).init() device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') self.id_classifier = nn.Linear(id_vect_size, int(n_id+1),device=device) self.cross_entr_loss=nn.CrossEntropyLoss(ignore_index=-1) self.dropout = nn.Dropout(0.3)
def forward(self, id_output, ind_target, mask_target, id_targets): id_vectors = gather_feat(id_output, ind_target) id_vectors = id_vectors[mask_target > 0].contiguous() id_vectors = F.normalize(id_vectors) id_targets = id_targets[mask_target > 0].contiguous() id_logits = self.id_classifier(id_vectors)
return self.cross_entr_loss(id_logits, id_targets)
the images are something like 45000, half of wich will be augmented