msracver / FCIS

Fully Convolutional Instance-aware Semantic Segmentation
MIT License
1.57k stars 415 forks source link

Slightly Lower Accurancy Using One GPU #130

Closed zhaodongsun closed 6 years ago

zhaodongsun commented 6 years ago

I trained the model with VOC2012 for 22 epochs using only one GPU. I got lower accuracy and the results are as follows.


AP for aeroplane = 78.25
AP for bicycle = 67.41
AP for bird = 68.85
AP for boat = 50.60
AP for bottle = 43.26
AP for bus = 79.10
AP for car = 66.94
AP for cat = 83.90
AP for chair = 42.19
AP for cow = 62.62
AP for diningtable = 38.98
AP for dog = 79.50
AP for horse = 72.32
AP for motorbike = 72.79
AP for person = 74.51
AP for pottedplant = 42.56
AP for sheep = 69.52
AP for sofa = 48.73
AP for train = 76.39
AP for tvmonitor = 63.45
Mean AP@0.5 = 64.09
~~~~~~ Evaluation use min overlap = 0.7 ~~~~~~
AP for aeroplane = 62.14
AP for bicycle = 46.08
AP for bird = 56.93
AP for boat = 33.01
AP for bottle = 33.32
AP for bus = 74.46
AP for car = 55.02
AP for cat = 74.52
AP for chair = 23.84
AP for cow = 49.38
AP for diningtable = 25.06
AP for dog = 69.40
AP for horse = 51.32
AP for motorbike = 54.13
AP for person = 53.81
AP for pottedplant = 26.13
AP for sheep = 50.61
AP for sofa = 33.74
AP for train = 65.45
AP for tvmonitor = 53.82
Mean AP@0.7 = 49.61
rogerwwww commented 6 years ago

When you are using only one GPU, the batch size is 1. When you are using N GPUs, though BATCH_IMAGES=1, your batch size is actually N as each GPU processes one image in parallel, resulting in N images processed together. I've tried with 2 GPUs, and I got mAP@0.5=65.57, mAP@0.7=51.61, which is closer to the result from the paper.

zhaodongsun commented 6 years ago

Maybe smaller batch size will lead to the less accurate gradient? Do I need more epochs to get the same accuracy? @rogerwwww

rogerwwww commented 6 years ago

Hi @zhaodongsun, Generally larger batch means faster convergence, while smaller batch will lead to higher accuracy with more epochs. You may have a try😃