Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

newbie questions on real time detection

Hello,

So i imported a model (darknet) and i can do classification and object detection. So my next step would to do it on videos instead of the pictures. Well my first naive approach was to do it on every frame, thas is horrible slow

    //bigger blob sizes make it slower
    Mat blob = blobFromImage(img, 1 / 255.F, new Size(416, 416), new Scalar(0), true, true);
    net.setInput(blob);

    long start = System.currentTimeMillis();
    Mat detectionMat = net.forward();//compute output
    long end = System.currentTimeMillis();
    System.err.println("net detection took: "+(end-start)+"ms");

The output is :

net detection took: 1842ms
net detection took: 1058ms
net detection took: 1176ms
net detection took: 1171ms

Here my questions: 1. I know its hard to say - but are the detection times "slow" ? 2. What can i do to improve the performance?

Thank you very much again + Greetings, Holger

Thank you + Greetings, Holger

newbie questions on real time detection

Hello,

So i imported a model (darknet) and i can do classification and object detection. So my next step would to do it on videos instead of the pictures. Well my first naive approach was to do it on every frame, thas is horrible slow

    //bigger blob sizes make it slower
    Mat blob = blobFromImage(img, 1 / 255.F, new Size(416, 416), new Scalar(0), true, true);
    net.setInput(blob);

    long start = System.currentTimeMillis();
    Mat detectionMat = net.forward();//compute output
    long end = System.currentTimeMillis();
    System.err.println("net detection took: "+(end-start)+"ms");

The output is :

net detection took: 1842ms
net detection took: 1058ms
net detection took: 1176ms
net detection took: 1171ms

Here my questions: 1.

  1. I know its hard to say - but are the detection times "slow" ? 2. ?
  2. What can i do to improve the performance?

Thank you very much again + Greetings, Holger

Thank you + Greetings, Holger

newbie questions on real time detection

Hello,

So i imported a model (darknet) and i can do classification and object detection. So my next step would to do it on videos instead of the pictures. Well my first naive approach was to do it on every frame, thas is horrible slow

    //bigger blob sizes make it slower
    Mat blob = blobFromImage(img, 1 / 255.F, new Size(416, 416), new Scalar(0), true, true);
    net.setInput(blob);

    long start = System.currentTimeMillis();
    Mat detectionMat = net.forward();//compute output
    long end = System.currentTimeMillis();
    System.err.println("net detection took: "+(end-start)+"ms");

The output is :

net detection took: 1842ms
net detection took: 1058ms
net detection took: 1176ms
net detection took: 1171ms

Here my questions:

  1. I know its hard to say - but are the detection times "slow" ?
  2. What can i do to improve the performance?

I was thinking about creating a buffer using object dection "in the future" and then use object detection to follow it (hope its faster) - Is that a good idea?

Thank you very much again + Greetings, Holger

newbie questions on real time detection

Hello,

So i imported a model (darknet) and i can do classification and object detection. So my next step would to do it on videos instead of the pictures. Well my first naive approach was to do it on every frame, thas is horrible slow

    //bigger blob sizes make it slower
    Mat blob = blobFromImage(img, 1 / 255.F, new Size(416, 416), new Scalar(0), true, true);
    net.setInput(blob);

    long start = System.currentTimeMillis();
    Mat detectionMat = net.forward();//compute output
    long end = System.currentTimeMillis();
    System.err.println("net detection took: "+(end-start)+"ms");

The output is :

net detection took: 1842ms
net detection took: 1058ms
net detection took: 1176ms
net detection took: 1171ms

Here my questions:

  1. I know its hard to say - but are the detection times "slow" ?
  2. What can i do to improve the performance?

I was thinking about creating a buffer using object dection "in the future" and then use object detection to follow it (hope its faster) once it reaches the frame - Is that a good idea?

Thank you very much again + Greetings, Holger

newbie questions on real time detection

Hello,

So i imported a model (darknet) and i can do classification and object detection. So my next step would to do it on videos instead of the pictures. Well my first naive approach was to do it on every frame, thas is horrible slow

    //bigger blob sizes make it slower
    Mat blob = blobFromImage(img, 1 / 255.F, new Size(416, 416), new Scalar(0), true, true);
    net.setInput(blob);

    long start = System.currentTimeMillis();
    Mat detectionMat = net.forward();//compute output
    long end = System.currentTimeMillis();
    System.err.println("net detection took: "+(end-start)+"ms");

The output is :

net detection took: 1842ms
net detection took: 1058ms
net detection took: 1176ms
net detection took: 1171ms

Here my questions:

  1. I know its hard to say - but are the detection times "slow" ?
  2. What can i do to improve the performance?

I was thinking about creating a buffer using object dection "in the future" and then use object detection tracking api to follow it (hope its faster) once it reaches the frame - Is that a good idea?

Thank you very much again + Greetings, Holger

newbie questions on real time detection

Hello,

So i imported a model (darknet) and i can do classification and object detection. So my next step would to do it on videos instead of the pictures. Well my first naive approach was to do it on every frame, thas is horrible slow

    //bigger blob sizes make it slower
    Mat blob = blobFromImage(img, 1 / 255.F, new Size(416, 416), new Scalar(0), true, true);
    net.setInput(blob);

    long start = System.currentTimeMillis();
    Mat detectionMat = net.forward();//compute output
    long end = System.currentTimeMillis();
    System.err.println("net detection took: "+(end-start)+"ms");

The output is :

net detection took: 1842ms
net detection took: 1058ms
net detection took: 1176ms
net detection took: 1171ms

Here my questions:

  1. I know its hard to say - but are the detection times "slow" ?
  2. What can i do to improve the performance?

I was thinking about creating a buffer using object dection "in the future" and then use object tracking api to follow it (hope its faster) once it reaches the frame - Is that a good idea?idea(dont know)?

Thank you very much again + Greetings, Holger

newbie questions on real time detection

Hello,

So i imported a model (darknet) and i can do classification and object detection. So my next step would to do it on videos instead of the pictures. Well my first naive approach was to do it on every frame, thas is horrible slow

    //bigger blob sizes make it slower
    Mat blob = blobFromImage(img, 1 / 255.F, new Size(416, 416), new Scalar(0), true, true);
    net.setInput(blob);

    long start = System.currentTimeMillis();
    Mat detectionMat = net.forward();//compute output
    long end = System.currentTimeMillis();
    System.err.println("net detection took: "+(end-start)+"ms");

The output is :

net detection took: 1842ms
net detection took: 1058ms
net detection took: 1176ms
net detection took: 1171ms

Here my questions:

  1. I know its hard to say - but are the detection times "slow" ?? If i would get it working with some delay its ok.
  2. What can i do to improve the performance?

I was thinking about creating a buffer using object dection "in the future" and then use object tracking api to follow it (hope its faster) once it reaches the frame - Is that a good idea(dont know)?

Thank you very much again + Greetings, Holger

newbie questions on real time detection

Hello,

So i imported a model (darknet) and i can do classification and object detection. So my next step would to do it on videos instead of the pictures. Well my first naive approach was to do it on every frame, thas is horrible slowslow My model: darknet yolo v2

    //bigger blob sizes make it slower
    Mat blob = blobFromImage(img, 1 / 255.F, new Size(416, 416), new Scalar(0), true, true);
    net.setInput(blob);

    long start = System.currentTimeMillis();
    Mat detectionMat = net.forward();//compute output
    long end = System.currentTimeMillis();
    System.err.println("net detection took: "+(end-start)+"ms");

The output is :

net detection took: 1842ms
net detection took: 1058ms
net detection took: 1176ms
net detection took: 1171ms

Here my questions:

  1. I know its hard to say - but are the detection times "slow" ? If i would get it working with some delay its ok.
  2. What can i do to improve the performance?

I was thinking about creating a buffer using object dection "in the future" and then use object tracking api to follow it (hope its faster) once it reaches the frame - Is that a good idea(dont know)?

Thank you very much again + Greetings, Holger