rbgirshick / py-faster-rcnn

Faster R-CNN (Python implementation) -- see https://github.com/ShaoqingRen/faster_rcnn for the official MATLAB version
Other
8.11k stars 4.11k forks source link

AP = 0 & mAP = 0 #610

Open 714586886 opened 7 years ago

714586886 commented 7 years ago

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!

ghost commented 7 years ago

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

gmayday1997 commented 7 years ago

Hi, have you found the reason about it?

Leerw commented 7 years ago

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

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

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

Leerw commented 6 years ago

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

Duankaiwen commented 6 years ago

@Leerw Thank you very much!

sulth commented 6 years ago

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

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

wubaorong commented 6 years ago

@Leerw Do you meet error in bbox_transform.py?

Leerw commented 6 years ago

Can you describe it in detail?from Li Renwu

wubaorong commented 6 years ago

@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

Leerw commented 6 years ago

@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

wubaorong commented 6 years ago

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

YoungMagic commented 6 years ago

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

wubaorong commented 6 years ago

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

ZhuangNi commented 6 years ago

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

zqdeepbluesky commented 6 years ago

@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!!!

wzli1214 commented 6 years ago

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.

zllljf commented 5 years ago

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?

hongyanghu commented 4 years ago

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 ?