DIGITS icon indicating copy to clipboard operation
DIGITS copied to clipboard

Changing the stride parameter in DetectNet

Open ShervinAr opened this issue 7 years ago • 5 comments

Hello all,

I am trying to train DetectNet on custom sized data where objects of interest can be smaller than 50 pixels in height/width. For this purpose, it looks like one needs to change the stride parameter of the network. However changing the stride parameter "only on its own", results in various errors while training the network. My question: which parameters exactly should be changed along the stride parameter so that the training process would not lead to errors and DetectNet can be able to detect objects smaller than 50 pixels?

ShervinAr avatar Feb 01 '17 17:02 ShervinAr

@ShervinAr Hello , have you figured out how to solve the problems , i am looking for this solution too .

sani1486 avatar Apr 05 '17 09:04 sani1486

Iam also in the similar situation.Please help me identify which all parameters along stride to be changed for the bounding box detection.

sulthanashafi avatar Apr 05 '17 10:04 sulthanashafi

@sani1486 in my case, the stride of 16 was found to be suitable, so i did not change it. But, if one needs to change it I guess care should be taken to make the dimensions of different layers consistent with each other.

ShervinAr avatar Apr 05 '17 12:04 ShervinAr

So I am trying to adjust the stride from 16 to 8 and am running into some dimensionality errors. I followed my layer dimensions through the net but it seems like the detectnet_data_transformation layer spits out two output layers with dimesions (2,3,384,1248) for data and (2, 9, 48, 156) for labels. After slicing up the labels the bounding box label is (2,4,48,156) Unfortunately, after the the data goes through the net its label dimensions are (2, 4, 24, 78). The last two dimensions are off by a factor of 2, the amount that I adjusted my stride. I tried to edit the pooling layers of the net to give me the correct dimensions which seemed to work but I ran out of memory because I am now using much more memory because I removed a pooling layer. I am now trying to see if I can somehow alter the dimension of the transformed_label output from the detectnet_transformation layer. It seems this layer is made to work only with a stride of 16. Can anyone confirm?

Any ideas on how to decrease the stride?

jtrovato avatar Oct 09 '17 23:10 jtrovato

i have the same error. anyone who have a solution? best regards

gabgiani avatar Nov 11 '19 08:11 gabgiani