nuralogix / dfx-demo-py

A simple Python-based demo that demonstrates how to use the DeepAffex SDK and DeepAffex Cloud API.
MIT License
10 stars 6 forks source link

Error: ROI17_TOI-failed to compute the signal #5

Closed kadnan closed 3 years ago

kadnan commented 3 years ago

I am getting bunch of errors while running the command python dfxdemo.py measure make vid.mp4. The error dump is below:


You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
QObject::moveToThread: Current thread (0x7fb42e521030) is not the object's thread (0x7fb43682b660).
Cannot move to target thread (0x7fb42e521030)

You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.
Sent chunk 1
Extraction complete, waiting for results
Received chunk 1
  Status: ANALYSIS_ERROR: ROI16_TOI-failed to compute the signal/ ROI13_TOI-failed to compute the signal/ ROI6_TOI-failed to compute the signal/ ROI8_TOI-failed to compute the signal/ ROI7_TOI-failed to compute the signal/ HR_BPM-failed to compute the signal/ SNR-failed to compute the signal/ ROI2_TOI-failed to compute the signal/ ROI1_TOI-failed to compute the signal/ ROI23_TOI-failed to compute the signal/ ROI4_TOI-failed to compute the signal/ ROI15_TOI-failed to compute the signal/ ROI9_TOI-failed to compute the signal/ ROI5_TOI-failed to compute the signal/ ROI11_TOI-failed to compute the signal/ ROI10_TOI-failed to compute the signal/ ROI14_TOI-failed to compute the signal/ ROI3_TOI-failed to compute the signal/ ROI22_TOI-failed to compute the signal/ ROI19_TOI-failed to compute the signal/ ROI17_TOI-failed to compute the signal/ ROI21_TOI-failed to compute the signal/ ROI18_TOI-failed to compute the signal/ ROI12_TOI-failed to compute the signal/
Measurement was cancelled by user.
None
None
Measurement 3243ad13-be70-4ed1-8bfa-95e4dde92ec2 failed
kadnan commented 3 years ago

I installed pip install opencv-python-headless and now it says:

Created DFX Collector:
    mode: discrete
    number chunks: 2
    chunk duration: 5.010000228881836s
Created measurement b3376627-6633-405b-abda-6a099d36710a
Extraction started
Sent chunk 1
Extraction complete, waiting for results
None
Status 400 for req#:QZYuPINBlB, Code: VALIDATION_ERROR, Message: '', Description: '{}'.
None
Measurement b3376627-6633-405b-abda-6a099d36710a failed

On dashboard it shows status as In Progress

sambhare commented 3 years ago

Hello Adnan,

If you use opencv-headless, there is no GUI support. If so, please run python dfxdemo.py measure make --no_render so that the demo doesn't attempt to show any GUI.

That said, your Status 400 seems to indicate an issue on the server. I will ask someone from the backend team to take a look.

YukeSW commented 3 years ago

Hello @kadnan ,

Please make sure that you are using the latest Python demo client. You should see a message saying Loaded: mobile20200702 before you see Created DFX Collector.

If the issue persists, please send us the payloads generated with --debug_save_chunks_folder as an argument when making a measurement, or the video you used.

kadnan commented 3 years ago

@YukeSW I just cloned a couple of days back. ARe you saying to run a git pull of this repo?

YukeSW commented 3 years ago

If you just cloned a few days ago, it should be the latest version. You can still run a git pull to make sure.

If you still see that error, please send us the payloads or the video.

kadnan commented 3 years ago

@YukeSW Here I got the error dump:

➜  dfx-demo-py git:(master) ✗ python dfxdemo.py measure make --no_render  vid2.mp4
Created DFX Factory: libdfx2 version 4.4.1 - Jun 26, 2020
Retrieved new DFX SDK config data with md5: 24d0bb4bde33fc9d0a7cdc9ec5354d6b
Config updated in ./config.json
[2020-12-02 00:58:44.089] [dfx] [info] Loading: mobile20200702 (64-bit version)
[2020-12-02 00:58:44.093] [dfx] [info] Loading: 
[2020-12-02 00:58:44.093] [dfx] [info] Loaded: 
[2020-12-02 00:58:44.093] [dfx] [info] Loaded: mobile20200702
Created DFX Collector:
    mode: discrete
    number chunks: 2
    chunk duration: 5.010000228881836s
Created measurement 4ce4677b-f69c-4558-880b-eac81ba299ff
Extraction started
Sent chunk 1
Extraction complete, waiting for results
Config updated in ./config.json
Measurement 4ce4677b-f69c-4558-880b-eac81ba299ff completed
Use 'python dfxdemo.py measure get' to get comprehensive results
Task exception was never retrieved
future: <Task finished coro=<main.<locals>.receive_results() done, defined at dfxdemo.py:296> exception=ValueError("Status 400 for req#:VczJtMCDYb, Code: VALIDATION_ERROR, Message: '', Description: '{}'.")>
Traceback (most recent call last):
  File "dfxdemo.py", line 299, in receive_results
    status, request_id, payload = dfxapi.Measurements.ws_decode(msg)
  File "/Users/Me/Data/XXX/X/deepaffex/dfx-demo-py/dfx_apiv2_client/Base.py", line 63, in ws_decode
    raise ValueError(f"Status {status} for req#:{request_id}, Code: {error.Code}, Message: '{error.Message}', "
kadnan commented 3 years ago

By enabling debugging it generated 3 files:

DOwnlaod from here: https://www.dropbox.com/s/6xo62foqob1h62j/debug_error.zip?dl=0

YukeSW commented 3 years ago

From your payload, it seems your video has a low FPS. The expected FPS for Deepaffex to work is 30.

Please try if our sample video works for you. You can find it in Sample Data at https://deepaffex.ai/developers-sdk when you scroll the page to the bottom.

kadnan commented 3 years ago

@YukeSW The sample file worked well and I can see graph on Deepaffex website. My measurementId is 851ce148-f729-40f8-bf05-e1bef2d061c6 in case if you want to check further.

What should we do while making videos? The earlier videos i made from my mobile for ~ 30 seconds

YukeSW commented 3 years ago

In general, a mobile camera (iPhone preferable) should work for a 30 FPS camera, and a rear camera is better than the front one.

The FPS of your video was about 17 FPS based on the payload. You might want to try to record a new video or try a new camera.