imx500: Running network.rpk on imx500 leads to: ValueError: tensor info length 260 does not match expected size 708 #17762
Replies: 5 comments 25 replies
-
👋 Hello @JochenSchmitz, thank you for reaching out about running your network on the imx500. It's great to see you're diving into Ultralytics 🚀! We recommend checking out our Docs, where you might find helpful information and examples for typical setups. If this is indeed a 🐛 Bug Report, please help us diagnose the issue more effectively by providing a minimum reproducible example. This will allow us to better understand the scenario and identify any potential problems. For questions related to custom training, please share as much relevant information as possible, such as dataset examples and any training logs. You should also ensure you're following our Tips for Best Training Results. Join the vibrant Ultralytics community for more interactive discussions! Whether it’s through Discord for real-time chats 🎧, Discourse for more detailed discussions, or our Subreddit for sharing insights, there are plenty of places to connect with fellow users. UpgradePlease make sure you’re using the latest version of the pip install -U ultralytics EnvironmentsYOLO can operate in a range of verified environments. Here's how you can get started with each:
StatusVerify our system's health with this CI badge: . Green indicates all tests are currently passing, ensuring smooth operation across all YOLO Modes and Tasks on different operating systems. This is an automated response 😊, and rest assured an Ultralytics engineer will follow up to assist you further! |
Beta Was this translation helpful? Give feedback.
-
I have exactly the same problem! I was able to get my rtk file for my custom YOLO model. Can someone help? |
Beta Was this translation helpful? Give feedback.
-
@JochenSchmitz hi Jochen, the error suggests a mismatch in tensor information length, which could be due to an issue with the exported |
Beta Was this translation helpful? Give feedback.
-
I am facing the same issue. |
Beta Was this translation helpful? Give feedback.
-
I followed the solution mentioned here I checked out Then, I ran the python object detection script. The model was uploaded successfully and it was running fine one the camera. |
Beta Was this translation helpful? Give feedback.
-
Hello, i finally managed to come to the Point where i have the network.rpk File. Starting the demo now gives me the result:
imm@JSPI10:~/Projekte/aiCam/picamera2/examples/imx500 $ python imx500_object_detection_demo.py --model ~/Projekte/aiCam/best_imx_model/network.rpk
[0:27:41.230457853] [3907] INFO Camera camera_manager.cpp:325 libcamera v0.3.2+27-7330f29b
[0:27:41.237921372] [3911] INFO RPI pisp.cpp:695 libpisp version v1.0.7 28196ed6edcf 29-08-2024 (16:33:32)
[0:27:41.238687766] [3911] WARN CameraSensorProperties camera_sensor_properties.cpp:305 No static properties available for 'imx500'
[0:27:41.238697544] [3911] WARN CameraSensorProperties camera_sensor_properties.cpp:307 Please consider updating the camera sensor properties database
[0:27:41.248370265] [3911] INFO RPI pisp.cpp:1154 Registered camera /base/axi/pcie@120000/rp1/i2c@88000/imx500@1a to CFE device /dev/media1 and ISP device /dev/media0 using PiSP variant BCM2712_C0
NOTE: Loading network firmware onto the IMX500 can take several minutes, please do not close down the application.
[0:27:41.291403903] [3907] INFO Camera camera.cpp:1197 configuring streams: (0) 640x480-XBGR8888 (1) 2028x1520-RGGB_PISP_COMP1
Network Firmware Upload: 0.00bytes [00:00, ?bytes/s][0:27:41.292237317] [3911] INFO RPI pisp.cpp:1450 Sensor: /base/axi/pcie@120000/rp1/i2c@88000/imx500@1a - Selected sensor format: 2028x1520-SRGGB10_1X10 - Selected CFE format: 2028x1520-PC1R
Network Firmware Upload: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.89M/2.89M [00:12<00:00, 242kbytes/s]
Traceback (most recent call last):
File "/home/imm/Projekte/aiCam/picamera2/examples/imx500/imx500_object_detection_demo.py", line 179, in
last_results = parse_detections(picam2.capture_metadata())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/imm/Projekte/aiCam/picamera2/examples/imx500/imx500_object_detection_demo.py", line 33, in parse_detections
np_outputs = imx500.get_outputs(metadata, add_batch=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/imm/Projekte/aiCam/picamera2/picamera2/devices/imx500/imx500.py", line 474, in get_outputs
output_shapes = self.get_output_shapes(metadata)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/imm/Projekte/aiCam/picamera2/picamera2/devices/imx500/imx500.py", line 491, in get_output_shapes
output_tensor_info = self.__get_output_tensor_info(output_tensor_info)['info']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/imm/Projekte/aiCam/picamera2/picamera2/devices/imx500/imx500.py", line 548, in __get_output_tensor_info
raise ValueError(f'tensor info length {len(tensor_info)} does not match expected size {size}')
ValueError: tensor info length 260 does not match expected size 708
imm@JSPI10:~/Projekte/aiCam/picamera2/examples/imx500 $
Can anyone help, please?
Thanks
Jochen
Beta Was this translation helpful? Give feedback.
All reactions