luuuyi / RefineDet.PyTorch

A higher performance PyTorch implementation of Single-Shot Refinement Neural Network for Object Detection
MIT License
235 stars 64 forks source link

Wrong with TCB module #40

Closed pengfeidip closed 4 years ago

pengfeidip commented 4 years ago

https://github.com/luuuyi/RefineDet.PyTorch/blob/0e4b24ce07245fcb8c48292326a731729cc5746a/models/refinedet.py#L115-L130


I think p = s should be in front of predictions of TCB.

for k, v in enumerate(sources[::-1]): 
     s = v 
     for i in range(3): 
         s = self.tcb0[(3-k)*3 + i](s) 
         #print(s.size()) 
     if k != 0: 
         u = p 
         u = self.tcb1[3-k](u) 
         s += u 

     p = s 

     for i in range(3): 
         s = self.tcb2[(3-k)*3 + i](s) 

     tcb_source.append(s) 
 #print([x.size() for x in tcb_source]) 
 tcb_source.reverse() 

If I were wrong, please tell me, Thank you!

pengfeidip commented 4 years ago

Sorry. I am wrong