TextBoxes_plusplus icon indicating copy to clipboard operation
TextBoxes_plusplus copied to clipboard

mbox_loss is always 0

Open noranart opened this issue 7 years ago • 16 comments

I always get mbox_loss = 0 with whatever training configurations. Could you provide some suggestions?

noranart avatar Feb 08 '18 18:02 noranart

Maybe there are some problems in your "xml" files. Note that the bounding boxes in "xml" files should be the format of "int", not "float".

MhLiao avatar Feb 09 '18 03:02 MhLiao

@MhLiao I also meet the problem.Could you help me? the xml is below:

train_images 126242.jpg 500 386 3 1 ### text 131 123 280 171 250 261 102 212 102 280 123 261

could you give me some suggestions ?

thank you very much

10183308 avatar Feb 11 '18 08:02 10183308

@noranart do you solve the problem? could you give me some suggestions? thank you very much

10183308 avatar Feb 11 '18 10:02 10183308

I set difficult to 0 on every image, and it starts training. But the training result is horribly wrong. There are boxes all over the place.

noranart avatar Feb 13 '18 19:02 noranart

Most of your labels are difficult?

MhLiao avatar Feb 13 '18 23:02 MhLiao

Yes,I want to know that the making label have something wrong .Could you give me some example.

| | huchao.999 邮箱:[email protected] |

签名由 网易邮箱大师 定制

On 02/14/2018 07:15, Minghui Liao wrote:

Most of your labels are difficult?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

10183308 avatar Feb 13 '18 23:02 10183308

i have the same problem...the final train loss is about 0.5,but when i use demo.py to test the model , the boxes appear in the image everywhere.

wangxi123 avatar Feb 24 '18 02:02 wangxi123

First Happy new year.

I am so excited to be able to provide samples of the making labels.

I want to know why my train loss is always 0. Below is my samples:

Look forward to your reply.

At 2018-02-14 07:15:53, "Minghui Liao" [email protected] wrote:

Most of your labels are difficult?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

10183308 avatar Feb 24 '18 02:02 10183308

I got mine to work. Thank you @MhLiao so much for the very nice repo. The 2 big things that I have to be careful were:

  1. Don't have too many difficult 1 (if you're not sure, just go with all 0).
  2. Points need some kind of order (top left, top right, bottom right, bottom left). Although rotated box is harder to define what is top left, simply throwing in random order disturb the training too much.

Mine end up producing many random boxes because it couldn't even overfit the training set. After it trained properly, box looks fine.

noranart avatar Feb 24 '18 03:02 noranart

@noranart Could you provide the code that you make xml file? It is reminds something wrong with me ,thank you.

luoqingyu avatar Mar 26 '18 14:03 luoqingyu

@noranart , I always get mbox_loss = 0,Could you provide the code that you make xml file?

SongLongZhang avatar Apr 09 '18 08:04 SongLongZhang

@noranart You've trully saved my day! I got mbox_loss==0 bacase I set all difficults to 1. Now the problem is fixed. Thank you a lot.

tianranwangcs avatar Jun 07 '18 05:06 tianranwangcs

@SongLongZhang This problem happens in several cases:

  1. negetive values in bndbox
  2. float values in bndbox
  3. too many 1 in difficult
  4. base_lr is too large (not so sure) Plz check if you have these cases.

tianranwangcs avatar Jun 07 '18 05:06 tianranwangcs

@noranart My training loss is properly decreased but the mbox_loss jumps from 0 to 5~7. My problem is how to define the (top left, top right, bottom right, bottom left) vertex. Since my text can rotate to any angles, and may be upside down, should I label (x1, y1) as the TRUE text top-left vertex or the image top-left vertex?

for a upside-down text, which label is correct? No. 1 (according to image) x1,y1 ------------------------x2,y2 |.......TEXT UPSIDE DOWN...........| |.......TEXT UPSIDE DOWN...........| x3,y3------------------------x4,y4

No. 2 (according to text) x3,y3 ------------------------x4,y4 |.......TEXT UPSIDE DOWN...........| |.......TEXT UPSIDE DOWN...........| x2,y2------------------------x1,y1

MarStarck avatar Oct 10 '18 02:10 MarStarck

about the txt2xml.py: https://github.com/jiachen0212/TextBoxes_plusplus/blob/master/txt2xml.py pay attention, i get the difficult=1, you can change it ~

jiachen0212 avatar Nov 20 '18 12:11 jiachen0212

@noranart hello, i confused with the "difficult" setting.... if i set difficult, what would happen? emmm... maybe i need to read the ssd source codes carefully?~ can you give me some idea~?

jiachen0212 avatar Nov 20 '18 13:11 jiachen0212