microsoft / vision-ai-developer-kit

Vision AI Developer Kit Preview
MIT License
131 stars 68 forks source link

camera sdk run-time error? http://<IP>:1080/vam RESPONSE: {"status":false,"reason":"Internal error"} #329

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hi, I am a new learned of Altek Vision AI DevKit. I am trying my own customvision.ai AI model. I followed the Quick Startup but find it not working on detecting Hardhat object.

Via adb shell, try to capture some logs from the corresponding container:

Shall I upgrade firmware or some container image?

Thanks for any clues

** logs begin ** Creating IoT Hub manager Subscribing to method calls Subscribing to module twin updates Received twin callback Received twin update: {'reported': {'ObjectsOfInterest': '["All"]', 'SupportedEncodingTypes': 'HEVC/H.265 | AVC/H.264', 'VideoAnalyticsEnabled': False, 'SupportedBitrates': '512Kbps | 768Kbps | 1Mbps | 1.5Mbps | 2Mbps | 3Mbps | 4Mbps | 6Mbps | 8Mbps | 10Mbps | 20Mbps', 'Bitrate': '1.5Mbps', 'HdmiDisplayActive': True, 'Codec': 'AVC/H.264', 'ModelZipUrl': 'https://aimodelmsiot.blob.core.windows.net/altek/c61efcb167dd4bb98b864d99c03a1933.VAIDK.zip', 'VideoOverlayConfig': 'inference', 'SupportedFrameRates': '24 | 30', 'Resolution': '1080P', 'ShowVideoPreview': True, 'SupportedResolutions': '4K | 1080P | 720P | 480P', 'FrameRate': 30, 'RtspVideoUrl': 'rtsp://192.168.50.168:8900/live', 'SupportedConfigOverlayStyles': 'text | inference', 'TimeBetweenMessagesInSeconds': 12, '$version': 10, 'ShowVideoOverlay': True}, 'desired': {'VideoAnalyticsEnabled': 'true', 'Bitrate': '1.5Mbps', 'HdmiDisplayActive': 'true', 'ObjectsOfInterest': '', 'VideoOverlayConfig': 'inference', 'Codec': 'AVC/H.264', 'Resolution': '1080P', 'ShowVideoPreview': 'true', 'FrameRate': 30, 'ModelZipUrl': 'https://aimodelmsiot.blob.core.windows.net/altek/c61efcb167dd4bb98b864d99c03a1933.VAIDK.zip', 'TimeBetweenMessagesInSeconds': 12, '$version': 2, 'ShowVideoOverlay': 'true'}} Clean up model folder. Deleting file /app/vam_model_folder/model.dlc... Deleting file /app/vam_model_folder/labels.txt... Deleting file /app/vam_model_folder/c61efcb167dd4bb98b864d99c03a1933.VAIDK.zip... Deleting file /app/vam_model_folder/cvexport.manifest... Deleting file /app/vam_model_folder/va-snpe-engine-library_config.json... Deleting file /app/vam_model_folder/LICENSE... Deleting file /app/vam_model_folder/README.md... Deleting file /app/vam_model_folder/metadata_properties.json... Downloading file: c61efcb167dd4bb98b864d99c03a1933.VAIDK.zip send: b'\x89\x801\xda\xf5\xf9' send: b'\x89\x804[\x81\xa4' File download is complete! Unzip the model files. Extract from file: /app/vam_model_folder/c61efcb167dd4bb98b864d99c03a1933.VAIDK.zip Configuring camera_client 2020-10-23 06:10:45,401 - iotccsdk - INFO - ipcprovider - send_request:212 - API: http://192.168.50.168:1080/overlay data {'switchStatus': False} 2020-10-23 06:10:45,444 - iotccsdk - INFO - ipcprovider - send_request:221 - RESPONSE: {"status":true} Turning analytics off configure_overlay: inference 2020-10-23 06:10:45,451 - iotccsdk - INFO - ipcprovider - send_request:212 - API: http://192.168.50.168:1080/overlayconfig data {'ov_color': '869007615', 'ov_usertext': 'Text', 'ov_height': 0, 'ov_start_y': 0, 'ov_type_SelectVal': 5, 'ov_width': 0, 'ov_start_x': 0, 'ov_position_SelectVal': 0} 2020-10-23 06:10:45,510 - iotccsdk - INFO - ipcprovider - send_request:221 - RESPONSE: {"status":true} configure_overlay_state: on 2020-10-23 06:10:45,517 - iotccsdk - INFO - ipcprovider - send_request:212 - API: http://192.168.50.168:1080/overlay data {'switchStatus': True} 2020-10-23 06:10:45,565 - iotccsdk - INFO - ipcprovider - __send_request:221 - RESPONSE: {"status":true} set_analytics_state: on 2020-10-23 06:10:45,580 - iotccsdk - INFO - ipcprovider - send_request:212 - API: http://192.168.50.168:1080/vam data {'switchStatus': True, 'vamconfig': 'MD'} send: b'\x89\x80h/a\xef' 2020-10-23 06:10:46,250 - iotccsdk - INFO - ipcprovider - send_request:221 - RESPONSE: {"status":false,"reason":"Internal error"} 2020-10-23 06:10:46,264 - iotccsdk - INFO - ipcprovider - __send_request:212 - API: http://192.168.50.168:1080/vam data {} 2020-10-23 06:10:46,347 - iotccsdk - INFO - ipcprovider - send_request:221 - RESPONSE: {"status":false} 2020-10-23 06:10:46,354 - iotccsdk - INFO - camera - _get_vam_info:431 - RESPONSE: {'status': False}: 2020-10-23 06:10:46,361 - iotccsdk - INFO - camera - _get_vam_info:444 - vam url: None Send prop: {"Codec": "AVC/H.264"} Send prop: {"FrameRate": 30} Send prop: {"RtspDataUrl": null} Send prop: {"Bitrate": "1.5Mbps"} Send prop: {"RtspVideoUrl": "rtsp://192.168.50.168:8900/live"} Send prop: {"VideoOverlayConfig": "inference"} Send prop: {"Resolution": "1080P"} Send prop: {"VideoAnalyticsEnabled": false} Send prop: {"HdmiDisplayActive": true} Send prop: {"ShowVideoOverlay": true} Send prop: {"ShowVideoPreview": true} Send prop: {"SupportedBitrates": "512Kbps | 768Kbps | 1Mbps | 1.5Mbps | 2Mbps | 3Mbps | 4Mbps | 6Mbps | 8Mbps | 10Mbps | 20Mbps"} Send prop: {"SupportedConfigOverlayStyles": "text | inference"} Send prop: {"SupportedEncodingTypes": "HEVC/H.265 | AVC/H.264"} Send prop: {"SupportedFrameRates": "24 | 30"} Send prop: {"SupportedResolutions": "4K | 1080P | 720P | 480P"} Send prop: {"ModelZipUrl": "https://aimodelmsiot.blob.core.windows.net/altek/c61efcb167dd4bb98b864d99c03a1933.VAIDK.zip"} Send prop: {"TimeBetweenMessagesInSeconds": 12} Send prop: {"ObjectsOfInterest": "[\"All\"]"} Confirmation of 204 received for {"Codec": "AVC/H.264"}. Confirmation of 204 received for {"FrameRate": 30}. Confirmation of 204 received for {"RtspDataUrl": null}. Confirmation of 204 received for {"Bitrate": "1.5Mbps"}. Confirmation of 204 received for {"RtspVideoUrl": "rtsp://192.168.50.168:8900/live"}. Confirmation of 204 received for {"VideoOverlayConfig": "inference"}. Confirmation of 204 received for {"Resolution": "1080P"}. Confirmation of 204 received for {"VideoAnalyticsEnabled": false}. Confirmation of 204 received for {"HdmiDisplayActive": true}. Confirmation of 204 received for {"ShowVideoOverlay": true}. Confirmation of 204 received for {"ShowVideoPreview": true}. Confirmation of 204 received for {"SupportedBitrates": "512Kbps | 768Kbps | 1Mbps | 1.5Mbps | 2Mbps | 3Mbps | 4Mbps | 6Mbps | 8Mbps | 10Mbps | 20Mbps"}. Confirmation of 204 received for {"SupportedConfigOverlayStyles": "text | inference"}. Confirmation of 204 received for {"SupportedEncodingTypes": "HEVC/H.265 | AVC/H.264"}. Confirmation of 204 received for {"SupportedFrameRates": "24 | 30"}. Confirmation of 204 received for {"SupportedResolutions": "4K | 1080P | 720P | 480P"}. Confirmation of 204 received for {"ModelZipUrl": "https://aimodelmsiot.blob.core.windows.net/altek/c61efcb167dd4bb98b864d99c03a1933.VAIDK.zip"}. Confirmation of 204 received for {"TimeBetweenMessagesInSeconds": 12}. Confirmation of 204 received for {"ObjectsOfInterest": "[\"All\"]"}. send: b'\x89\x80\x82\xdcwV' send: b'\x89\x80\x8b\xa3\xa3\xb0' send: b'\x89\x80\x08\x0em\xc5' send: b'\x89\x80\xfc\x90\xde\xb7' send: b'\x89\x80:}\x84B' send: b'\x89\x80\xe0\xa1\n\x0e' send: b'\x89\x80[\x91\xfa\xff' send: b'\x89\x80\x08@\x1c\xec' send: b'\x89\x80{\x9c\xda\xfb' send: b'\x89\x80u\x84\x01*' send: b'\x89\x80\xea.,\xaa' send: b'\x89\x80[N`\xbf' send: b'\x89\x80\x94\xc2\xa3\xbc' send: b'\x89\x80\x94\x14\x90\x9f' send: b'\x89\x80\x97\x9b\x07(' send: b'\x89\x80\xacr\xafq' send: b'\x89\x80\xe8\x90\xfb\x14' send: b'\x89\x80\x92?\xc4 ' send: b'\x89\x80s\x8e\xc6\xbd' send: b'\x89\x80##\xea\xf4' send: b'\x89\x80\x12\x90\xc6\x01' send: b'\x89\x80\xa2#/\xbe' send: b'\x89\x80\x10m\x9e\x07' send: b'\x89\x80\xaf\x1b\xcc7'

ghost commented 3 years ago

Not very sure why there are many "zero"s for PixelNorm, BlueMean, GreenMean

/data/misc/camera # cat va-snpe-engine-library_config.json { "FrameworkType":0, "Engine":3, "NetworkIO":0, "ScaleWidth":300, "ScaleHeight":300, "PixelNorm":0, "BlueMean":0, "GreenMean":0, "RedMean":0, "TargetFPS":30, "ConfThreshold":0.7, "DLC_NAME":"model.dlc", "LABELS_NAME":"labels.txt", "InputLayers":"data", "OutputLayers":["model_output"], "ResultLayers":["model_output"], "Runtime":1

v-prsasa commented 3 years ago

@learn-leeee Can you try to upgrade the firmware and check once.

ghost commented 3 years ago

yes. according to https://store.altek.com.tw/qualcomm/downloads/Azure-IoT-Starter-Kit I am already using v0.5370, the latest one.