Open hughsando opened 6 years ago
@hughsando Yes, the code for the reorg
-layer on CPU/GPU makes strange permutations. Obviously, Joseph had in mind other logic of this function. There is required a new model with a fixed reorg2.0-layer. Or you can use models without reorg: tiny-yolo, yolo9000.
Also some review and discussions were here: https://github.com/opencv/opencv/pull/9705#discussion_r143136536
Ok, thanks. Hopefully next next version will have even better performance. Feel free to close this one if you have moved on.
differ from Reshape
of Caffe
So... re-implement and share with community...
On Sun, Jan 28, 2018 at 10:59 AM, Shuai Yuan notifications@github.com wrote:
differ from Reshape of Caffe
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pjreddie/darknet/issues/344#issuecomment-361061199, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA9cxsWLAEKhaOAfoI_4-THi_PcZI9aks5tPG8rgaJpZM4QvLeM .
-- Regards,
Luiz Vitor Martinez Cardoso
"The only limits are the ones you place upon yourself"
I have been studying the reorg_cpu code, and it seem a little odd. My interpretation of it is (ignoring batch, 'reverse' (inference) only):
Where the number of channels on the 'big' image is smaller than the number of channels on the 'small' image. However, the w,h,c passed in are the values from the 'big' image (26,26,64), not the 'small' image (13,13,256). So the 'out_c' becomes 16, not 256 and the components are distributed over several pixels. There is a 1-1 relation between input and output pixels, so there not actually a bug, but is seems to me you might get a better result by passing in the small (output) size rather than the large (input) size to maintain the convolutional nature of the algorithm. Of course, this would need the weights to change and retraining.