bonsai-rx / deeplabcut

A Bonsai interface for real-time markerless pose estimation using DeepLabCut
MIT License
47 stars 9 forks source link

DetectPose issue #11

Closed emilyjanedennis closed 2 years ago

emilyjanedennis commented 2 years ago

hi folks,

We have trained and exported a model and are now attempting to use it in bonsai - We are using a pylonCapture node, then an Image node (made by right clicking the PylonCapture node and choosing Output > Image) and then a DetectPose node. In the terminal, we get some signs that it's using the GPU (see bottom of message for terminal output) but a pop up Runtime Error tells us:

POP UP ERROR Assertion failed: src.size == dst.size && src.channels() == dst.channels() in function cvConvertScale, convert.cpp(1372)

Honestly, I'm not sure how to debug this. I'm assuming that the input is wrong in some way, but I've tried putting in nothing and putting in sensible numbers (like 0.4 for scaling, since we used global scale of 0.4) but am not sure what else to try to debug. Assistance either in solving the problem or in debugging it would be really helpful.

One potential issue is that our images are large (2048 x 2048), but we did not down sample for training (we set global scale to 0.4 and max size to 4500 for training but the actual labeled images are all 2048x2048).

computer/software specs We are using a Windows 10 machine GeForce RTX 2080 Ti DLC version 2.2b8 tensorflow version 1.15.4 Bonsai 2.6.3

TERMINAL OUTPUT


2022-05-10 15:00:24.044485: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2022-05-10 15:00:24.049159: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
2022-05-10 15:00:24.052333: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_100.dll
2022-05-10 15:00:24.055099: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_100.dll
2022-05-10 15:00:24.059470: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_100.dll
2022-05-10 15:00:24.060571: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_100.dll
2022-05-10 15:00:24.061476: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2022-05-10 15:00:24.063614: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2022-05-10 15:00:24.063850: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2022-05-10 15:00:24.065016: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]      0
2022-05-10 15:00:24.066105: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0:   N
2022-05-10 15:00:24.068503: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 9525 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:65:00.0, compute capability: 7.5)
glopesdev commented 2 years ago

Duplicate of #3

@emilyjanedennis DLC networks expect the input images to always be in the RGB color format. In the current version (0.2.0), this means you need to explicitly convert from Grayscale to RGB using the ConvertColor node. In the upcoming version (0.3.0) you can specify the desired color conversion in the PredictPose node so you don't have to convert.