experiencor / keras-yolo2

Easy training on custom dataset. Various backends (MobileNet and SqueezeNet) supported. A YOLO demo to detect raccoon run entirely in brower is accessible at https://git.io/vF7vI (not on Windows).
MIT License
1.73k stars 784 forks source link

Why I can't get a good result? #258

Open chaiyixuan opened 6 years ago

chaiyixuan commented 6 years ago

I run the Blood Cell Detection.ipynb, the training loss: 0.0035 ,but the val_loss is 0.2372. The predict result is: untitled

I use the following setting: `LABELS = ['RBC']

IMAGE_H, IMAGE_W = 416, 416 GRID_H, GRID_W = 13 , 13 BOX = 5 CLASS = len(LABELS) CLASS_WEIGHTS = np.ones(CLASS, dtype='float32') OBJ_THRESHOLD = 0.3 NMS_THRESHOLD = 0.3 ANCHORS = [1.3221, 1.73145, 3.19275, 4.00944, 5.05587, 8.09892, 9.47112, 4.84053, 11.2364, 13.0071]

NO_OBJECT_SCALE = 1.0 OBJECT_SCALE = 5.0 COORD_SCALE = 1.0 CLASS_SCALE = 1.0

BATCH_SIZE = 10 WARM_UP_BATCHES = 100 TRUE_BOX_BUFFER = 10

wt_path = 'yolov3.weights'
`

chaiyixuan commented 6 years ago

optimizer = Adam(lr=1e-4, beta_1=0.9, beta_2=0.999, epsilon=1e-08, decay=0.0) with 100 epochs

experiencor commented 6 years ago

You use too many warmup batches. WARM_UP_BATCHES of 3 is enough.