nuralogix / dfx-api-client-python

The DFX API Python Client is a library that simplifies access to the DeepAffex API
MIT License
0 stars 2 forks source link

Unable to process chunks developed from the DFX SDK #6

Open KhushalGoyal opened 4 years ago

KhushalGoyal commented 4 years ago

Hey Team,

I was unable to process the chunks developed from the video feed, can you please help me what I am doing wrong here.

Process Summary:-

  1. Generating an MP4 file from OpenCV
  2. Converting it to .MOV format using FFmpeg
  3. Gets an ERROR while processing.
 Error message:  ANALYSIS_ERROR: ROI16_TOI-float division by zero/ ROI22_TOI-float division by zero/ ROI18_TOI-float division by zero/ ROI9_TOI-float division by zero/ ROI11_TOI-float division by zero/ ROI14_TOI-float division by zero/ ROI17_TOI-float division by zero/ ROI12_TOI-float division by zero/ ROI13_TOI-float division by zero/ SNR-zero-size array to reduction operation maximum which has no identity/ ROI1_TOI-float division by zero/ HR_BPM-zero-size array to reduction operation maximum which has no identity/ ROI2_TOI-float division by zero/ ROI15_TOI-float division by zero/ ROI8_TOI-float division by zero/ ROI21_TOI-float division by zero/ ROI5_TOI-float division by zero/ ROI4_TOI-float division by zero/ ROI3_TOI-float division by zero/ ROI7_TOI-float division by zero/ ROI23_TOI-float division by zero/ ROI19_TOI-float division by zero/ ROI10_TOI-float division by zero/ ROI6_TOI-float division by zero/

Thanks.

sambhare commented 4 years ago

Hello Khushal, what is your study id and what is your study config file? Looks like the video was processed properly locally, but there was a server issue in processing the bloodflow data.

KhushalGoyal commented 4 years ago

Hey @sambhare, Study ID is 70dfd386-d2b2-4e85-bc04-88cc28625bff, So is there any chance we can resolve this issue or thing you think will help me on this.

sambhare commented 4 years ago

Khushal, yes we should be able to resolve it. Which code base are you using here - it it our old demo (https://github.com/nuralogix/dfx-e2e-demo-python) or our new demo (https://github.com/nuralogix/dfx-demo-py) or have you developed your own code using our SDKs.

Also, in addition to the study ID, I would like to know what study config file you are using to initialize the SDK (or are you calling the studies/getconfig API endpoint to retrieve it?) (https://dfxapiversion10.docs.apiary.io/#reference/0/studies/getconfig)

KhushalGoyal commented 4 years ago

@sambhare , I tried to build my own code using the SDK and the SimpleClient API's. No I am not using the studies/getconfig API. I am using default.config which got generated while using end to end demo.

I am referring to the old code base for creating my own demo (https://github.com/nuralogix/dfx-e2e-demo-python)

sambhare commented 4 years ago

Hi Khushal, default.config is just a json file that contains things like your username and tokens etc. (it is just an artifact our of Python demo and is not really needed if you are developing your own code.)

By study config file, I mean a file like e.g. generic-v7.dat that used to be distributed with our C++ sdk. We have deprecated manually distributing the files though in favour of using the studies/getconfig API endpoint - please see this code to see how to call it. The output is base64 encoded and you have to decode it to get a bytearray which you can pass to the SDK.

KhushalGoyal commented 4 years ago

Hey Sambhare,

Got it, like to mention that I am using the generic-v7.dat file, For face tracker using shape_prefictor_68_face_landmark.dat file, face detection strategy as smart while extraction.

sambhare commented 4 years ago

Ok. Because of some updates to our cloud, that generic-v7.dat will have problems (which is why we have removed it from the SDK package.)

I would suggest you use the new API endpoint to download the file (that way, if we ever update it, the updates get downloaded to your app automatically.) If that's not feasible, please let me know and I will send you the file via email. Please see here on how to handle the response of that API and what to send to it... https://github.com/nuralogix/dfx-demo-py/blob/master/dfxdemo.py#L426

KhushalGoyal commented 4 years ago

Okay, Thank you so much, For now, It would be very helpful if you can send over the mail, Will surely update the codebase for future development.

Mail Id : khushal.goyal16@gmail.com

sambhare commented 4 years ago

Better endpoint documentation for when you do update your code: https://dfxapiversion10.docs.apiary.io/#reference/0/studies/retrieve-sdk-study-config-data

KhushalGoyal commented 4 years ago

Hey Looks like I am not able to get the config file on my study id.

{
    "Code": "NOT_FOUND",
    "Message": "No ConfigFile avaialble for StudyID: 70dfd386-d2b2-4e85-bc04-88cc28625bff"
}
sambhare commented 4 years ago

Khushal, can you please try the endpoint again and see if it works now?