JdeRobot / DetectionMetrics

Tool to evaluate deep-learning detection and segmentation models, and to create datasets

Home Page:https://jderobot.github.io/DetectionMetrics/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DatasetEvaluationApp | Caffe - Error starting camera

dbutragueno opened this issue · comments

Hi!

I found a problem when I tried to run DatasetEvaluationApp script. I am working with Caffe and I wanted to use my laptop cam to detect the objects captured but, after starting the app, when I pressed Process button to see the camera, the following error showed up:


I0424 22:28:17.004871 2895 Utils.cpp:91] 0
I0424 22:28:17.004951 2895 CameraReader.cpp:4] Starting Capture from device with DeviceId: 0
I0424 22:28:17.414113 2895 FrameworkInferencer.cpp:35] Mean inference time: 0(ms)
I0424 22:28:17.414162 2895 CameraReader.cpp:14] Releasing Camera
E0424 22:28:17.415625 2895 mainwindow.cpp:504] Exception Detected: stof

Later, I tried the app using a saved video but the result was the same.

Could this problem be related to the inferencer used? If not, would you know the reason for this problem?

Thanks!

Hi @DavidButra ,
This is a problem relating to the inferencer you are using, Could you send the weights and config file of the inferencer you are using.

Also, a list of supported inferencers is present here

In the meantime you can test the following Caffe inferencer:

Weights File: https://drive.google.com/open?id=0B3gersZ2cHIxZi13UWF0OXBsZzA
Config File: https://drive.google.com/file/d/1hO233qK0FvLL9MQSFViRRfJC7tvVi1Hk/view?usp=sharing
Class name File: https://github.com/JdeRobot/DetectionSuite/wiki/voc.names

I have tested the above with the following inferencer params:
Inferencer params

Hi @vinay0410,

I found my error. It was because of parameters I was using. But now, introducing a correct inferencer, the following error shows up.


I0427 17:04:56.104221 3216 Utils.cpp:91] 0
I0427 17:04:56.237280 3216 MassInferencer.cpp:101] Evaluating : 1(1/0)
OpenCV Error: Assertion failed (blobs.size() != 0) in getMemoryShapes, file /home/davidbutra/opencv/modules/dnn/src/layers/convolution_layer.cpp, line 253
I0427 17:04:56.265655 3216 FrameworkInferencer.cpp:35] Mean inference time: 0(ms)
I0427 17:04:56.265722 3216 VideoReader.cpp:17] Releasing Video File
E0427 17:04:56.269784 3216 mainwindow.cpp:504] Exception Detected: /home/davidbutra/opencv/modules/dnn/src/layers/convolution_layer.cpp:253: error: (-215) blobs.size() != 0 in function getMemoryShapes

Do you know what the problem is?

Thanks!

Hi @DavidButra ,
This error is probably occuring due to the use of incorrect weights file or incorrect config file.
Did you try the combination, of weights, config and parameters I mentioned in my previous comment.

Hi @vinay0410,

I tried the app using the combination, of weights, config and parameters you mentioned, but the error persists.

Área de trabajo 1_001

Hello @vinay0410,

Do you know something new about this issue?

Thanks!

Hi @vinay0410,

I share a screen recording of how I am trying the app using Caffe [1]. I also attach a image with opencv version I am using.

[1] https://www.youtube.com/watch?v=zZM9mOAi5y8&feature=youtu.be

Selección_002

Hi @DavidButra ,
It was my mistake, the weight and config files I gave you were incompatible.
Please find attached new weights and config files.
Also, don't select RGB, because this model is trained on BGR images.

Weights File: https://drive.google.com/open?id=1G9l_X1UwlyhaSBHRcXes5GjydVzZ7sWC
Config File: https://drive.google.com/open?id=1b97yKuv2_D_JrLOzaDPQTkJdFDWImqzF
Class Names File: Same as before

Other parameters remain same as before.

I have tested them with both OpenCV 3.4 and 4.0

Hi @vinay0410,

it works! Now, the camera shows up. But, there seems to be a problem because inside the Detection window, no object is detected, showing only the captured images.

The output of the application is something like that:

Terminal

What could be the problem?

Thanks!

Hi @DavidButra ,
I have tested these inferencers again on my end.
And they are detecting objects.
Screenshot from 2019-05-13 10-25-31

I see that there are no detections on your side. Try switching the Use RGB checkbox, and decreasing the confidence threshold.

Also, make sure that you are pointing to objects listed in voc.names. It will only detect those 20 objects.

If you are still facing issues, then just post a screen shot of your detection window, just like I did.

Hi @vinay0410,

I tried the app using RGB checkbox and decreasing the confidence threshold until almost the minimum (0.05).

Área de trabajo 1_004

I tried recording a tv monitor like you did but the application still didn't detect any objects.

Área de trabajo 1_006

app

caffe
result

Hi @vinay0410,

I've just installed Caffe and JdeRobot in a new pc from scratch, but the problem persists, because the application still doesn't detect any objects.

I am using VirtualBox with Ubuntu 16.04 and I have installed Caffe using CPU-only mode. Could this have anything to do with it?

Thank you again.

Hi @vinay0410,

I tried the app using a pretrained SSD model and it works correctly. Maybe, there is something wrong in the models I was using.

DetectionSuite_1

DetectionSuite_2

Regards!

Good news @DavidButra, glad to know it works now on your machine. Well done @vinay0410 !