You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
Thank you for these elaborate and clear notebooks and resources.
When running the code I get the following error:
IndexError: invalid index to scalar variable
After examination, the error originates at convert_to_blob function in line: outputLayers = [(yoloLayers[i[0]-1]) for i in network.getUnconnectedOutLayers()]
Debugging the code using Pycharm leads me to believe variable i is simply a scalar (int32).
The function getUnconnectedOutLayers, according to __doc__ "Returns indexes of layers with unconnected outputs".
After converting i[0] to simply i I get recognition, but a very poor one.
It is not the first time I come across this issue in a yolo project and I am not sure I am doing everything right.
Is there something I'm missing?
The text was updated successfully, but these errors were encountered:
I have the same problem for a project about yolov3, on the internet I found some solutions for this like, removing the [0] index in the next to i, but it's not working, and there are no other solutions or debug for this one...
I'm really curious about the solution, too!
So if you ever find anything, let me know, please.
Edit: I fixed the problem. But, my solution depends on your OS. Which one you're trying to run with this project. For example, I was using MacBook, but then I tried to run with windows and it worked.
Delete the [0] index and try to run with Windows if you're using a Mac.
I hope, this could be helpful.
Hello!
Thank you for these elaborate and clear notebooks and resources.
When running the code I get the following error:
IndexError: invalid index to scalar variable
After examination, the error originates at
convert_to_blob
function in line:outputLayers = [(yoloLayers[i[0]-1]) for i in network.getUnconnectedOutLayers()]
Debugging the code using Pycharm leads me to believe variable
i
is simply a scalar (int32).The function
getUnconnectedOutLayers
, according to__doc__
"Returns indexes of layers with unconnected outputs".After converting
i[0]
to simplyi
I get recognition, but a very poor one.It is not the first time I come across this issue in a yolo project and I am not sure I am doing everything right.
Is there something I'm missing?
The text was updated successfully, but these errors were encountered: