FateScript / CenterNet-better

An easy to understand and better performance version of CenterNet
Apache License 2.0
548 stars 104 forks source link

test resolution (输入尺度带来的增益) #52

Open JosephChenHub opened 2 years ago

JosephChenHub commented 2 years ago

Hi Feng, I'd like to first appreciate this implementation. However, as mentioned in issue #35 , the processing of inference is different from the original Centernet. Specifically, the original algo. resize the image to (512, 512), and then the decoded results are mapped into the original sizes. But in this implementation, the input is padded and then sent to the network. I think the major performance gain is brought by the larger resolution, and I change the inference process like Centernet ( steps: resize the image to (512, 512) -> forward -> decode on the heatmap (128x128) -> resize via the original width/height), the inference results are listed as follows.

Model Inference Size (512x512) Reported (Pad <=32) Centernet
Res18-DCN 28.8 29.8 28.1
Res50-DCN 33.9 34.9 -
Res101-DCN 35.4 36.8 34.6

Compared to the official implementation, the performance gain is about 0.8 points.

JosephChenHub commented 2 years ago

Another concern is that there exists a difference in DCN's implementation between this repo. and CenterNet .

FateScript commented 2 years ago

Sounds like your resize didn't keep the aspect ratio?

JosephChenHub commented 2 years ago

Sounds like your resize didn't keep the aspect ratio?

I use the AffineTransform to resize the image while keeping the aspect ratio.