py-faster-rcnn icon indicating copy to clipboard operation
py-faster-rcnn copied to clipboard

AP = 0 & mAP = 0

Open 714586886 opened this issue 7 years ago • 21 comments

When I test the model on my own dataset,I get this AP=0 and mAP=0, as follows:

Evaluating detections Writing hd VOC results file VOC07 metric? Yes /home/sys418/py-faster-rcnn_1/tools/../lib/datasets/voc_eval.py:194: RuntimeWarning: invalid value encountered in divide rec = tp / float(npos) /home/sys418/py-faster-rcnn_1/tools/../lib/datasets/voc_eval.py:41: RuntimeWarning: invalid value encountered in greater_equal if np.sum(rec >= t) == 0: AP for hd = 0.0000 Mean AP = 0.0000

Results:
0.000
0.000

How to fix this error? Thanks!

714586886 avatar Jun 21 '17 03:06 714586886

i also met the same issue. Have you fixed it?

ghost avatar Jun 22 '17 01:06 ghost

Hi, have you found the reason about it?

gmayday1997 avatar Jun 22 '17 07:06 gmayday1997

Hi!After my training on my own dataset, it said my background AP is 0 and my interest class AP is 0.905, so I wanna know why the background AP is 0 and does it matter?

Leerw avatar Oct 15 '17 15:10 Leerw

Here is the text:

AP for backgroud = 0.0000
AP for myclass = 0.9025 Mean AP = 0.4513

Results:
0.000
0.903
0.451

Leerw avatar Oct 15 '17 15:10 Leerw

i also met the same issue. Have you fixed it? @714586886 @duoyun1314 @gmayday1997 @xzy295461445 @Leerw

Duankaiwen avatar Nov 11 '17 16:11 Duankaiwen

Yes, I have. For me, it was just a small mistake with wrong spelling of 'background'.Good luckfrom Lee.rw-------- 原始邮件 --------主题:Re: [rbgirshick/py-faster-rcnn] AP = 0 & mAP = 0 (#610)发件人:DuanKaiwen 收件人:rbgirshick/py-faster-rcnn 抄送:"Lee.rw" ,Mention i also met the same issue. Have you fixed it? @714586886 @duoyun1314 @gmayday1997 @xzy295461445 @Leerw

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

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/rbgirshick/py-faster-rcnn","title":"rbgirshick/py-faster-rcnn","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/rbgirshick/py-faster-rcnn"}},"updates":{"snippets":[{"icon":"PERSON","message":"@Duankaiwwen in #610: i also met the same issue. Have you fixed it? @714586886 @duoyun1314 @gmayday1997 @xzy295461445 @Leerw "}],"action":{"name":"View Issue","url":"https://github.com/rbgirshick/py-faster-rcnn/issues/610#issuecomment-343674958"}}}

Leerw avatar Nov 14 '17 15:11 Leerw

@Leerw Thank you very much!

Duankaiwen avatar Nov 15 '17 13:11 Duankaiwen

Isuccessfully trained resnet model once with accurate result. But now ,iam hitting with the error below: Have anyone got the similar runtime warning.Have you fixed it?please help me.

Writing car VOC results file Writing pedestrian VOC results file Writing truck VOC results file Writing dontcare VOC results file VOC07 metric? Yes /home/ubuntu/customFRCN/py-faster-rcnn/tools/../lib/datasets/voc_eval.py:195: RuntimeWarning: invalid value encountered in divide rec = tp / float(npos) /home/ubuntu/customFRCN/py-faster-rcnn/tools/../lib/datasets/voc_eval.py:41: RuntimeWarning: invalid value encountered in greater_equal if np.sum(rec >= t) == 0: AP for car = 0.0000 AP for pedestrian = 0.0000 AP for truck = 0.3495 AP for dontcare = 0.3104 Mean AP = 0.1650

Results:
0.000
0.000
0.350
0.310
0.165

sulth avatar Nov 18 '17 16:11 sulth

Hi sulth, I met the same warning, for me, It’s because (1). the number of samples for “truck” and ”bus” are too few compared with “car” (2). There are many small objects in “bus” and “truck” (the size of bus and truck are too small). Good luck!

发自网易邮箱大师 On 11/19/2017 00:28, sulthmailto:[email protected] wrote:

Isuccessfully trained resnet model once with accurate result. But now ,iam hitting with the error below: Have anyone got the similar runtime warning.Have you fixed it?please help me.

Writing car VOC results file Writing pedestrian VOC results file Writing truck VOC results file Writing dontcare VOC results file VOC07 metric? Yes /home/ubuntu/customFRCN/py-faster-rcnn/tools/../lib/datasets/voc_eval.py:195: RuntimeWarning: invalid value encountered in divide rec = tp / float(npos) /home/ubuntu/customFRCN/py-faster-rcnn/tools/../lib/datasets/voc_eval.py:41: RuntimeWarning: invalid value encountered in greater_equal if np.sum(rec >= t) == 0: AP for car = 0.0000 AP for pedestrian = 0.0000 AP for truck = 0.3495 AP for dontcare = 0.3104 Mean AP = 0.1650

Results: 0.000 0.000 0.350 0.310 0.165

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/rbgirshick/py-faster-rcnn/issues/610#issuecomment-345453227, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AcEAyKQ2_phQDbxpD3N3_iSYXKebMOQ5ks5s3wWcgaJpZM4OAa3l.

Duankaiwen avatar Nov 20 '17 02:11 Duankaiwen

@Leerw Do you meet error in bbox_transform.py?

wubaorong avatar Nov 27 '17 02:11 wubaorong

Can you describe it in detail?from Li Renwu

Leerw avatar Nov 29 '17 01:11 Leerw

@Leerw when I train the network,after print iteration 0 , it print this error: /home/wu/faster_rcnn/py-faster-rcnn/tools/../lib/fast_rcnn/bbox_transform.py:48: RuntimeWarning: overflow encountered in exp pred_w = np.exp(dw) * widths[:, np.newaxis] /home/wu/faster_rcnn/py-faster-rcnn/tools/../lib/fast_rcnn/bbox_transform.py:48: RuntimeWarning: overflow encountered in multiply pred_w = np.exp(dw) * widths[:, np.newaxis] /home/wu/faster_rcnn/py-faster-rcnn/tools/../lib/fast_rcnn/bbox_transform.py:49: RuntimeWarning: overflow encountered in exp pred_h = np.exp(dh) * heights[:, np.newaxis] /home/wu/faster_rcnn/py-faster-rcnn/tools/../lib/fast_rcnn/bbox_transform.py:49: RuntimeWarning: overflow encountered in multiply pred_h = np.exp(dh) * heights[:, np.newaxis] /home/wu/faster_rcnn/py-faster-rcnn/tools/../lib/rpn/proposal_layer.py:175: RuntimeWarning: invalid value encountered in greater_equal keep = np.where((ws >= min_size) & (hs >= min_size))[0] Floating Point Exception

wubaorong avatar Dec 01 '17 00:12 wubaorong

@wubaorong I have not met this problem, it seems your dw or dh is overflow, perhaps you can check your image's size, lol, my idea may not work, good luck

Leerw avatar Dec 01 '17 01:12 Leerw

@Leerw Thank you very much,I will try this method.

wubaorong avatar Dec 01 '17 02:12 wubaorong

@714586886 Have you solve this problem? I'm using resnet-18 in faster rcnn.Training process is normal. But I got 0 ap for every class. I think the problem is my test.prototxt, but i couldn't figure out why.

YoungMagic avatar Dec 10 '17 09:12 YoungMagic

@714586886 Sorry, I haven't made this step yet. Now I'm training the net, but when I use ZF net to train faster rcnn end2end, in log folder without log file, but if I train faster rcnn alt_opt, the log file could autosaved. Do you know the reasons?

wubaorong avatar Dec 11 '17 03:12 wubaorong

@714586886 @duoyun1314 @gmayday1997 @Duankaiwwen Mean AP = 0.0000 I have met the same problem. Have you fixed it?

ZhuangNi avatar Jan 10 '18 09:01 ZhuangNi

@714586886 @Leerw @duoyun1314 @gmayday1997 @Duankaiwwen hi guys,I met the same problem as you did: /home/zq/faster_rcnn/py-faster-rcnn/tools/../lib/rpn/proposal_layer.py:175: RuntimeWarning: invalid value encountered in greater_equal keep = np.where((ws >= min_size) & (hs >= min_size))[0] Floating Point Exception(core dumped)

can you please help me?I feel so helpless. thanks so much!!!

zqdeepbluesky avatar Mar 12 '18 08:03 zqdeepbluesky

I set the iteration max_iters = [50,50,50,50]. I have got the result like this.

AP for license = 0.0000 Mean AP = 0.0000

Results:
0.000
0.000

What's the problem?

I only trained 2 classes (license + background). Are there some errors with my own data set? I imitated the form of PASCAL VOC to create my own data set.

wzli1214 avatar Mar 21 '18 06:03 wzli1214

When I test the model on my own dataset,I get this AP=0 and mAP=0, as follows:

Evaluating detections Writing hd VOC results file VOC07 metric? Yes /home/sys418/py-faster-rcnn_1/tools/../lib/datasets/voc_eval.py:194: RuntimeWarning: invalid value encountered in divide rec = tp / float(npos) /home/sys418/py-faster-rcnn_1/tools/../lib/datasets/voc_eval.py:41: RuntimeWarning: invalid value encountered in greater_equal if np.sum(rec >= t) == 0: AP for hd = 0.0000 Mean AP = 0.0000

Results:
0.000
0.000

How to fix this error? Thanks!

hello i also met this problem, and i have checked the class is lower-case like "person", Have you fixed it and how can i fix it?

zllljf avatar Jan 15 '19 04:01 zllljf

When I test the model on my own dataset,I get this AP=0 and mAP=0, as follows: Evaluating detections Writing hd VOC results file VOC07 metric? Yes /home/sys418/py-faster-rcnn_1/tools/../lib/datasets/voc_eval.py:194: RuntimeWarning: invalid value encountered in divide rec = tp / float(npos) /home/sys418/py-faster-rcnn_1/tools/../lib/datasets/voc_eval.py:41: RuntimeWarning: invalid value encountered in greater_equal if np.sum(rec >= t) == 0: AP for hd = 0.0000 Mean AP = 0.0000

Results:
0.000
0.000

How to fix this error? Thanks!

hello i also met this problem, and i have checked the class is lower-case like "person", Have you fixed it and how can i fix it?

have you solve the probelm?i met the same problem that i used VOC2007 and there is no spelling error about lower-case,but all of the AP is zero.can you help me ?

hongyanghu avatar Dec 05 '19 08:12 hongyanghu