tfjs-tiny-yolov2 icon indicating copy to clipboard operation
tfjs-tiny-yolov2 copied to clipboard

Loss reduced, but not result with net.detect

Open lchanouha opened this issue 4 years ago • 3 comments

Hello, I'm trying to train my object detection model. I can successfully see the loss fastly decreased:

noObjectLoss[0]: 211
objectLoss[0]: 0.051
coordLoss[0]: 0.8326
classLoss[0]: 0
totalLoss[0]: 211.8837

to

noObjectLoss[0]: 0.0006
objectLoss[0]: 4.8865
coordLoss[0]: 0.0001
classLoss[0]: 0
totalLoss[0]: 4.8873

by as the totalloss decrease, objectloss increases and net.detect does not provide any results anymore, even with one single image used for training and threshold at 0.1. It comes from a result of 169 ObjectDetection array after first epoch to 0.

I do not think that thje problem comes from my training data since the problem occurs even with static single image.

Does someone have an idea ? Thanks Louis.

lchanouha avatar Mar 09 '20 21:03 lchanouha

After significantly increase learning rate, i got after few steps:

Error: Box.constructor - expected box to be IBoundingBox | IRect, instead have {"left":0.6,"top":null,"right":0.6,"bottom":null} at BoundingBox.Box (Box.js:11) at new BoundingBox (BoundingBox.js:7) at TinyYolov2Trainable.TinyYolov2.extractBoxes (TinyYolov2.ts:236) at TinyYolov2Trainable.computeLoss (TinyYolov2Trainable.ts:114) at TinyYolov2Trainable.ts:75 at tf-core.esm.js:17 at tf-core.esm.js:17 at e.scopedRun (tf-core.esm.js:17) at e.tidy (tf-core.esm.js:17) at e.gradients (tf-core.esm.js:17)

lchanouha avatar Mar 15 '20 19:03 lchanouha

Did you solved this problem? I also succeed training, but It detects nothing

Juwan-s avatar Apr 02 '21 18:04 Juwan-s

@Juwan-s After a lot of tries I gaved up this lib. Box detection decreases as much as the loss. They must me be some problem with input/output on training.

lchanouha avatar Apr 05 '21 17:04 lchanouha