MhLiao / TextBoxes_plusplus

TextBoxes++: A Single-Shot Oriented Scene Text Detector
Other
953 stars 279 forks source link

mbox_loss is always 0 #11

Open noranart opened 6 years ago

noranart commented 6 years ago

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

MhLiao commented 6 years ago

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".

10183308 commented 6 years ago

@MhLiao I also meet the problem.Could you help me? the xml is below: <?xml version="1.0" encoding="utf-8"?>

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 commented 6 years ago

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

noranart commented 6 years ago

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.

MhLiao commented 6 years ago

Most of your labels are difficult?

10183308 commented 6 years ago

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

huchao.999 邮箱:huchao.999@163.com

签名由 网易邮箱大师 定制

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.

wangxi123 commented 6 years ago

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.

10183308 commented 6 years ago

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" notifications@github.com 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.

noranart commented 6 years ago

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.

luoqingyu commented 6 years ago

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

tianranwangcs commented 6 years ago

@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 commented 6 years ago

@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.
MarStarck commented 5 years ago

@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

jiachen0212 commented 5 years ago

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 commented 5 years ago

@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~?