Open Rosskong opened 3 years ago
Python 3.6.9
Linux version 5.4.0-53-generic (buildd@lgw01-amd64-046) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04))
opencv 3.2.0
Python 3.6.9
Linux version 5.4.0-53-generic (buildd@lgw01-amd64-046) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #59~18.04.1-Ubuntu SMP Wed Oct 21 12:14:56 UTC 2020
opencv 3.2.0
I met the same problem as yours. I successfully ran the detect.tflite on the github but when I changed it to my converted detect.tflite , the problem occurs , have you solved it?
Python 3.6.9
Linux version 5.4.0-53-generic (buildd@lgw01-amd64-046) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #59~18.04.1-Ubuntu SMP Wed Oct 21 12:14:56 UTC 2020
opencv 3.2.0
I suspect this is caused by the version of our tensorflow or others , I have tried an official tensorlite model transfer code but there is an error again which frustrates me a lot.
Python 3.6.9
Linux version 5.4.0-53-generic (buildd@lgw01-amd64-046) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #59~18.04.1-Ubuntu SMP Wed Oct 21 12:14:56 UTC 2020
opencv 3.2.0
Hello, Have you fixed your problem?
I got it!!! I solved the problem!!!So unforgettable!!!
@chenkang455 How did you do that? what's wrong with the program? Can you tell me? I need your help .
Consider changing the detect.py boxes =get_output_tensor(interpreter, 1) classes = get_output_tensor(interpreter, 3) scores = get_output_tensor(interpreter, 0)
Chenkang455, Thank you so much. That worked for me after I changed the four lines you recommended. I had a problem when I tried to run detect.py with the thumbsup, thumbsdown, thankyou & livelong gestures.
boxes = get_output_tensor(interpreter, 1) classes = get_output_tensor(interpreter, 3) scores = get_output_tensor(interpreter, 0) count = int(get_output_tensor(interpreter, 2))
Thanks for this,I was stuck here for 2 days. Questioning on stack overflow and almost throwing my RPi on the wall. T_T ...you are a legend'
hello , guys, I have a problem . When I run the first program, it runs successfully.
it can detect and recognize the Hello gesture. But when I imported the tflite model like a blogger and successfully changed the label(Happy and Sad), I started running the code, and the code reported an error. The error is as follows:
ross@ross-KPL-W0X:~/桌面/Sentiment/TFODRPi$ python3 detect.py Traceback (most recent call last): File "detect.py", line 88, in
main()
File "detect.py", line 68, in main
res = detect_objects(interpreter, img, 0.8)
File "detect.py", line 45, in detect_objects
count = int(get_output_tensor(interpreter, 3))
TypeError: only size-1 arrays can be converted to Python scalars
@nicknochnack can you help me ?
Oh, by the way, I'm running on the Ubuntu system of the dual system on my computer, and you're running on raspberry pie. I don't know whether this will affect the program. However, I successfully ran the program to detect Hello, but there was an error in the program happy and sad.