ManishSoni1908 / Mobilenet-ssd-keras

A Keras port of Single Shot MultiBox Detector as Mobilenet as a Backbone
62 stars 24 forks source link

mAP performance less than described in README.md #12

Open aviziskind opened 4 years ago

aviziskind commented 4 years ago

Hi, I ran the evaluation/evaluate_mobilenet_ssd.py script with the ported caffe weights (converted_model.h5), but do not get the same performance on Pascal VOC 2007 test set as listed in the README. Instead of mAP = 0.72, I am getting only 0.60. Here is the output:


conv1 shape:  (?, 150, 150, 64)
conv3 shape:  (?, 75, 75, 128)
conv5 shape:  (?, 38, 38, 256)
conv11 shape:  (?, 19, 19, 512)
conv13 shape:  (?, 10, 10, 1024)
conv14 shape (?, 5, 5, 512)
conv15 shape (?, 3, 3, 256)
conv16 shape (?, 2, 2, 256)
conv17 shape (?, 1, 1, 128)
in training mode
test.txt: 100%|################################################| 4952/4952 [00:15<00:00, 326.26it/s]
100%|######################################################| 4952/4952 [01:27<00:00, 56.41it/s]
{1: 0.6582769942418452, 2: 0.7074689072332891, 3: 0.5563934789612284, 4: 0.36349331853142075, 5: 0.2500957849184571, 6: 0.7013080193552115, 7: 0.6480330505082427, 8: 0.8638017958482334, 9: 0.30534146262398937, 10: 0.5665687912478549, 11: 0.5829543939784212, 12: 0.7710338047398388, 13: 0.796709703931759, 14: 0.7240417114592665, 15: 0.5583351492336373, 16: 0.31662854572624366, 17: 0.544288907315243, 18: 0.6605708736337355, 19: 0.8186047021705101, 20: 0.6356954041767866}
MAP is : 0.6014822399917608

The only changes I made to the code were compatibility changes (e.g. K.image_dim_ordering() == 'tf' to K.image_data_format() == 'channels_last'), or print ... to print ( ... ), and fixing a few import statements I am using tensorflow 1.13.1 and keras 2.3.0, python 3.5.4.

Note: after some experimentation I found that I can increase the mAP from 0.60 to 0.63 by setting steps=None to use automatic anchor box spacing. But I still cannot reach 0.72. Do you know the source of the discrepancy between these values and the published mAP of 0.72?

Thanks!