New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
object __array__ method not producing an array #72
Comments
Met the same problem in creator_tool.py and non_maximum_suppression.py. Would be very grateful if there is any help or useful information |
Is this problem solved? |
I also met this problem. And when I check the code, I found that the loc produced from rpn is -inf. I really don't konw where the errors exist |
not yet, sorry
来自 魅族 PRO 6s
…-------- 原始邮件 --------
发件人:ChuckGithub <notifications@github.com>
时间:周三 10月10日 18:38
收件人:chenyuntc/simple-faster-rcnn-pytorch <simple-faster-rcnn-pytorch@noreply.github.com>
抄送:hepinghu <silencehehp@163.com>,Author <author@noreply.github.com>
主题:Re: [chenyuntc/simple-faster-rcnn-pytorch] object __array__ method not producing an array (#72)
Is this problem solved?
—
You are receiving this because you authored the thread.
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/chenyuntc/simple-faster-rcnn-pytorch","title":"chenyuntc/simple-faster-rcnn-pytorch","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in ***@***.*** in #72: Is this problem solved?"}],"action":{"name":"View Issue","url":"#72 (comment)"}}} [ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#72 (comment)", "url": "#72 (comment)", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } }, { ***@***.***": "MessageCard", ***@***.***": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [chenyuntc/simple-faster-rcnn-pytorch] object __array__ method not producing an array (#72)", "sections": [ { "text": "", "activityTitle": "**ChuckGithub**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": ***@***.***", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", ***@***.***": "ActionCard", "inputs": [ { "isMultiLine": true, ***@***.***": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", ***@***.***": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"chenyuntc/simple-faster-rcnn-pytorch\",\n\"issueId\": 72,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", ***@***.***": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"chenyuntc/simple-faster-rcnn-pytorch\",\n\"issueId\": 72\n}" }, { "targets": [ { "os": "default", "uri": "#72 (comment)" } ], ***@***.***": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", ***@***.***": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 383717472\n}" } ], "themeColor": "26292E" } ]
|
I changed the pytorch version 0.4 it’s ok |
OK,thanks!
来自 魅族 PRO 6s
…-------- 原始邮件 --------
发件人:ChuckGithub <notifications@github.com>
时间:周一 10月29日 13:47
收件人:chenyuntc/simple-faster-rcnn-pytorch <simple-faster-rcnn-pytorch@noreply.github.com>
抄送:hepinghu <silencehehp@163.com>,Mention <mention@noreply.github.com>
主题:Re: [chenyuntc/simple-faster-rcnn-pytorch] object __array__ method not producing an array (#72)
I changed the pytorch version 0.4 it’s ok
—
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/chenyuntc/simple-faster-rcnn-pytorch","title":"chenyuntc/simple-faster-rcnn-pytorch","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in ***@***.*** in #72: I changed the pytorch version 0.4 it’s ok "}],"action":{"name":"View Issue","url":"#72 (comment)"}}} [ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "#72 (comment)", "url": "#72 (comment)", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } }, { ***@***.***": "MessageCard", ***@***.***": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [chenyuntc/simple-faster-rcnn-pytorch] object __array__ method not producing an array (#72)", "sections": [ { "text": "", "activityTitle": "**ChuckGithub**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": ***@***.***", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", ***@***.***": "ActionCard", "inputs": [ { "isMultiLine": true, ***@***.***": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", ***@***.***": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"chenyuntc/simple-faster-rcnn-pytorch\",\n\"issueId\": 72,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", ***@***.***": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"chenyuntc/simple-faster-rcnn-pytorch\",\n\"issueId\": 72\n}" }, { "targets": [ { "os": "default", "uri": "#72 (comment)" } ], ***@***.***": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", ***@***.***": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 383717472\n}" } ], "themeColor": "26292E" } ]
|
@hepinghu @ChuckGithub @foreverzzx Any solution to this? My PyTorch version is 0.4 but I am still having this issue. |
sry |
Hey guys, I was having the same issue. The Proposal Creator was removing all roi's due to them being smaller than the min_size. Therefore, no roi's were being fed to the RPN which led to this error. I later found out that my pre-processing was being done incorrectly which was leading into unreasonable values at that point and everything was getting pruned (due to my pretrained network). So make sure you are performing the image correct pre-processing. Hope this helps! |
thank you! it works! |
I also met this problem and my PyTorch version is 0.4.1. @F0lha @AngelaDevHao I didn't change the source code. So how could the pre-processing been done incorrectly? Can you show me some more details? Many Thanks! |
TL;DR: Make sure the width and height of your bboxes are greater than zero!So, I also ran into this issues (I am experimenting with my own dataset and using pytorch 1.0.0) As @foreverzzx mentioned, this error is caused by the This is the my tracing process:
Hope my trace can help you guys. @blateyang |
In my case, it caused by bbox generating nan sometimes. Changing lr from 1e-3 to 1e-4 will solve the problem. |
Thanks for advice from @howardyclo and @HogFeet . I made sure that all the bboxes have valid heights or weights and I also changed lr from 1e-3 to 1e-4. Finally the problem have been solved. |
Thank you, @howardyclo !
to
in function |
try to replace function _smooth_l1_loss with this code.
The problem caused by nan value of loss function. Some values of tensor y becomes nan. So I just replaced nan values with zeros. Then I just sum the rest of tensor values and get positive number of Loss function which is also positive but isn't nan. Cant's say if it's sciencely correct, but training don't crush anymore. |
thank you!!!!!! |
|
I think the problem is in the ProposalCreator().This function will filter out the inappropriate anchor.So when the rpn's out is unnoraml,this will cause the roi unnormal after the loc2bbox(anchor, loc).The code after loc2bbox() will filter the anchor which area is smaller then min_size.So when the lr or loss function is not fit ,after several iterations,lot of anchor area will become unnormal and the num of anchor after filter will become 0. Finally the error will appear on the roi = roi[keep],because the len(roi) is 0.
|
Hi guys, I also met the error when I use Tensorflow2.2-cpu. I solve the question by upgrading numpy version from 1.15.4 to 1.19.2(the latest version). |
train epoch..
test epoch..
train epoch
.
.
.
1671it [11:17, 2.47it/s]'>' not supported between instances of 'float' and 'NoneType'
1675it [11:18, 2.47it/s]Traceback (most recent call last):
File "train.py", line 132, in
fire.Fire()
File "/home/hhp/.local/lib/python3.6/site-packages/fire/core.py", line 127, in Fire
component_trace = _Fire(component, args, context, name)
File "/home/hhp/.local/lib/python3.6/site-packages/fire/core.py", line 366, in _Fire
component, remaining_args)
File "/home/hhp/.local/lib/python3.6/site-packages/fire/core.py", line 542, in _CallCallable
result = fn(*varargs, **kwargs)
File "train.py", line 81, in train
trainer.train_step(img, bbox, label, scale)
File "/home/hhp/project/faster_rcnn_cervix/trainer.py", line 168, in train_step
losses = self.forward(imgs, bboxes, labels, scale)
File "/home/hhp/project/faster_rcnn_cervix/trainer.py", line 99, in forward
self.faster_rcnn.rpn(features, img_size, scale)
File "/home/hhp/.conda/envs/chainer/lib/python3.6/site-packages/torch/nn/modules/module.py", line 357, in call
result = self.forward(*input, **kwargs)
File "/home/hhp/project/faster_rcnn_cervix/model/region_proposal_network.py", line 127, in forward
scale=scale)
File "/home/hhp/project/faster_rcnn_cervix/model/utils/creator_tool.py", line 429, in call
roi = roi[keep]
ValueError: object array method not producing an array
This problem occurred at the Kth epoch of the training. Thanks for you help.
The text was updated successfully, but these errors were encountered: