-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Uncaught (in promise) TypeError: Cannot read property 'name' of undefined #4637
Comments
@pravastacaraka can you please share minimal code to reproduce the error , you can create a repo or use codepen. Thank you |
Sorry for the late response, I've fixed this problem |
What did you do? i have the same problem. |
@dewball345 Unfortunately there is no way to fix this yet. As we know on PR ultralytics/yolov5#1127 using ops |
Okay, so why did you put this then? also, I converted from pytorch to onnx to tensorflow .pb then to tensorflowjs with tensorflow_converter. Was there anything else that you did? |
I will try later using this PR as well, though I think there may be something wrong with my input. Can i see your tensorflow.js inference code? thanks! |
Okay, so i was able to conduct inference in tensorflow.js and am currently working on a non-max suppression algorithm. What i did previously is that I converted pytorch -> onnx -> tensorflow saved model -> tensorflow.js. In the last step, there may have been some kind of conversion error. I suggest you use @zldrobit's tensorflow branch of the ultralytics' yolov5 repo. You can find the link at https://github.com/zldrobit/yolov5/. |
@dewball345 Have you finished the algorithm of non-max suppression? |
No, not yet. You know, it's. Actually quite simple(just turn the non max
suppression function in utils.general to js)
…On Fri, Jun 11, 2021, 5:48 AM Pravasta Caraka ***@***.***> wrote:
@dewball345 <https://github.com/dewball345> Have you finished the
algorithm of non-max suppression?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4637 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHGJKVHNEHCPPGNS7WGSJB3TSIAZLANCNFSM4XCZ3W4A>
.
|
Okay, you can expect it soon; i'm probably going to make a repo with it
On Fri, Jun 11, 2021 at 4:20 PM Abhiraam Eranti ***@***.***>
wrote:
… No, not yet. You know, it's. Actually quite simple(just turn the non max
suppression function in utils.general to js)
On Fri, Jun 11, 2021, 5:48 AM Pravasta Caraka ***@***.***>
wrote:
> @dewball345 <https://github.com/dewball345> Have you finished the
> algorithm of non-max suppression?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#4637 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHGJKVHNEHCPPGNS7WGSJB3TSIAZLANCNFSM4XCZ3W4A>
> .
>
|
@dewball345 I really appreciate it. Awaited the good news! |
@pravastacaraka Okay, i implemented the nms as well as some pre/post processing, and you can view it here |
hello @pravastacaraka : i am still getting this error on using the ssd_mobilenet v2 model. I used the repo and training from tensorflow blog below. Is there any help you all can offer. I am bit new to this object detection and I think I am stuck. |
This shouldnt be an error with the model? Looks like you were using some template and forgot to change the number of classes to your amount... I'm guessing the index i was greater than the number of classes that you had in your model, but I'm not sure |
Hi @dewball345 : I will recheck this but I am quite sure I had changed the number of classes to 6 which is what my required number of classes are supposed to be. However, the prediction is returning a number like "1190" which is thus obviously outside the expected classes json defined earlier in the program. that is also why the model is not able to get the name for class 1190 which is not in my master definition. but the problem is, this same model is able to detect the objects correctly on server using python. the converted model to tensorflowjs is where the problem is. Would you have any idea on why this can be ? |
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information
Describe the problem
Previously I had a trained model from YOLOv5. Then I wanted to try running it in the browser, so I converted it to the tfjs model. However, I have a problem when inference.
Provide the exact sequence of commands/steps that you executed before running into the problem
I call the element of an image, then I change it to tensor4d then I predict, but this problem always arises:
"Uncaught (in promise) TypeError: Cannot read property 'name' of undefined"
Any other info/logs
Uncaught (in promise) TypeError: Cannot read property 'name' of undefined
at graph_executor.js:307
at Array.reduce ()
at GraphExecutor.executeFunctionAsync (graph_executor.js:306)
at Module.executeOp (control_executor.js:31)
at async Promise.all (:3000/index 0)
at async GraphExecutor.executeWithControlFlow (graph_executor.js:351)
at async GraphExecutor._executeAsync (graph_executor.js:285)
at async GraphModel.executeAsync (graph_model.js:316)
The text was updated successfully, but these errors were encountered: