GithubHelp home page GithubHelp logo

Comments (9)

prabindh avatar prabindh commented on July 28, 2024 1

Did you try this suggestion - "A simple way could be, to convert C1 to BGRA using something like, cvtColor(src,dst,CV_GRAY2RGB);, before feeding to the detect function."

from darknet.

prabindh avatar prabindh commented on July 28, 2024

Have you been able to train Yolov3 using 1-channel, to generate a working model ?

from darknet.

prabindh avatar prabindh commented on July 28, 2024

A simple way could be, to convert C1 to BGRA using something like, cvtColor(src,dst,CV_GRAY2RGB);, before feeding to the detect function.

from darknet.

prabindh avatar prabindh commented on July 28, 2024

To do it efficiently with 1 channel itself without conversion, can you provide a trained model, so I can verify the detection changes ?

from darknet.

shaikhibrahim951 avatar shaikhibrahim951 commented on July 28, 2024

I am training data using Yolov2a and image type is 1 channel.
The code is giving problem in following line.
Image is getting converted to floatMat, then following process is happening.

`
if (floatMat.channels() != 3)
{
EPRINTF("Detect: channels = %d \n", floatMat.channels());
return false;
}
// Get the image to suit darknet
cv::Mat floatMatChannels[3];
cv::split(floatMat, floatMatChannels);
vconcat(floatMatChannels[0], floatMatChannels[1], floatMat);
vconcat(floatMat, floatMatChannels[2], floatMat);

__Detect((float*)floatMat.data, thresh, hier_thresh, objectCount);`

It is going to this if condition if (floatMat.channels() != 3)

Image is not passing to __detect function.

Thanks

from darknet.

prabindh avatar prabindh commented on July 28, 2024

Could you also specify which camera you are using so I could try some sample data ?

from darknet.

shaikhibrahim951 avatar shaikhibrahim951 commented on July 28, 2024

cvtColor(src,dst,CV_GRAY2RGB); worked for me and able to detect desired object in frame. I am using Melaxis ToF camera.

from darknet.

prabindh avatar prabindh commented on July 28, 2024

Very good and thanks for confirming. If permitted by your project, also please share some sample train images you are using.

from darknet.

prabindh avatar prabindh commented on July 28, 2024

Closing as the issue is resolved.

from darknet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.