sfzhang15 / RefineDet

Single-Shot Refinement Neural Network for Object Detection, CVPR, 2018
Other
1.43k stars 393 forks source link

I got low mAP #189

Closed DonghoonPark12 closed 4 years ago

DonghoonPark12 commented 4 years ago

From 07++12+COCO: RefineDet320 models, I got below mAP.

AP for aeroplane = 0.5529
AP for bicycle = 0.6211
AP for bird = 0.3103
AP for boat = 0.3999
AP for bottle = 0.2098
AP for bus = 0.6221
AP for car = 0.6267
AP for cat = 0.2832
AP for chair = 0.4089
AP for cow = 0.1832
AP for diningtable = 0.3275
AP for dog = 0.2463
AP for horse = 0.3719
AP for motorbike = 0.4102
AP for person = 0.4622
AP for pottedplant = 0.1743
AP for sheep = 0.2381
AP for sofa = 0.4453
AP for train = 0.5505
AP for tvmonitor = 0.4229
Mean AP = 0.3934
Results:
0.553
0.621
0.310
0.400
0.210
0.622
0.627
0.283
0.409
0.183
0.328
0.246
0.372
0.410
0.462
0.174
0.238
0.445
0.551
0.423
0.393

What am I doing wrong??

DonghoonPark12 commented 4 years ago

From 07++12: RefineDet320 models, I got below mAP.

AP for aeroplane = 0.5991
AP for bicycle = 0.6397
AP for bird = 0.2521
AP for boat = 0.3615
AP for bottle = 0.2036
AP for bus = 0.6113
AP for car = 0.5900
AP for cat = 0.2438
AP for chair = 0.3680
AP for cow = 0.2267
AP for diningtable = 0.4172
AP for dog = 0.2274
AP for horse = 0.2748
AP for motorbike = 0.4164
AP for person = 0.4333
AP for pottedplant = 0.1614
AP for sheep = 0.2236
AP for sofa = 0.4212
AP for train = 0.4462
AP for tvmonitor = 0.3905
Mean AP = 0.3754
Results:
0.599
0.640
0.252
0.362
0.204
0.611
0.590
0.244
0.368
0.227
0.417
0.227
0.275
0.416
0.433
0.161
0.224
0.421
0.446
0.391
0.375
DonghoonPark12 commented 4 years ago

This is 'Single_scale' test. By the way, thanks for sharing your product. It's really helpful.

DonghoonPark12 commented 4 years ago

Oops, sorry.

I add one line and it makes a terrible result.

(In OpenCV4.0, There are some bugs that after I resize Image using cv2.resize. The image seems like changed to np.float32 data type and OpenCV4.x can't show np.float32 type for some reasons. I don't know the reason. )

So I change the data type to np.uint8 to see images and It occurs low evaluation. Interesting.

def im_detect(net, im, targe_size):
    im_orig = im.astype(np.float32, copy=True)
    im_orig -= cfg.PIXEL_MEANS
    im = cv2.resize(im_orig, None, None, fx=float(targe_size)/float(im.shape[1]), fy=float(targe_size)/float(im.shape[0]), interpolation=cv2.INTER_LINEAR)
    #im = im.astype(np.uint8, copy=True) # <--- This line.
    blob = np.zeros((1, targe_size, targe_size, 3), dtype=np.float32)
    # cv2.imshow("im", im)
    # cv2.waitKey(0)

I leave my mistake.