“Unknown layer type: net in function” when loading yolov3 using OpenCV's DNN libraryOpenCV's clustering function cvKMeans2() - what is a type of cluster center in array?OpenCV's clustering function cvKMeans2() - why doesnt work when i use the centers parameterOpenCV Error: Bad argument <Unknown array type> in unknown function, file ......modulescoresrcmatrix.cpp, line 697Different matching results for opencv's descriptor_extractor_matcher when loading data from fileError when using two flags OpenCv's calibrateCamera functionOpenCV - Unknown array type in function cvarrToMatParsing the cfg file froom YOLO-Darknet in OpenCV DNNOpenCV unknown layer type running darknet detectopencv dnn load darknet unknow layer type sseProblems using cv::dnn::Layer cv::dnn::LayerFactory and cv::dnn::Net

Earliest evidence of objects intended for future archaeologists?

Repurpose telephone line to ethernet

Does == actually work the same or different when comparing two primitives vs two Objects in Java?

To plot branch cut of logarithm

Installing certbot - error - "nothing provides pyparsing"

What causes burn marks on the air handler in the attic?

How to add a table description to a longtable?

Do banks' profitability really suffer under low interest rates

Is there a utility / method to organize trad gear so that each piece is immediately accessible?

Reducing contention in thread-safe LruCache

Why should I pay for an SSL certificate?

What security risks does exposing the size of the plaintext entail?

Peterhead Codes and Ciphers Club: Weekly Challenge

Starships without computers?

Have made several mistakes during the course of my PhD. Can't help but feel resentment. Can I get some advice about how to move forward?

Why is su world executable?

The anatomy of an organic infrared generator

Linear and Integer programming materials

Will some rockets really collapse under their own weight?

Virtual destructor moves object out of rodata section

Airline power sockets shut down when I plug my computer in. How can I avoid that?

Why should P.I be willing to write strong LOR even if that means losing a undergraduate from his/her lab?

Designing a prison for a telekinetic race

Would getting a natural 20 with a penalty still count as a critical hit?



“Unknown layer type: net in function” when loading yolov3 using OpenCV's DNN library


OpenCV's clustering function cvKMeans2() - what is a type of cluster center in array?OpenCV's clustering function cvKMeans2() - why doesnt work when i use the centers parameterOpenCV Error: Bad argument <Unknown array type> in unknown function, file ......modulescoresrcmatrix.cpp, line 697Different matching results for opencv's descriptor_extractor_matcher when loading data from fileError when using two flags OpenCv's calibrateCamera functionOpenCV - Unknown array type in function cvarrToMatParsing the cfg file froom YOLO-Darknet in OpenCV DNNOpenCV unknown layer type running darknet detectopencv dnn load darknet unknow layer type sseProblems using cv::dnn::Layer cv::dnn::LayerFactory and cv::dnn::Net






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am attempting to use Yolov3 using OpenCV's (4.0.1) DNN Library on MacOs in C++. I am trying to use cv::dnn::readNetFromDarknet to load the yolov3.cfg file but I am getting this error :



"(-212:Parsing error) Unknown layer type: net in function
'ReadDarknetFromCfgStream'"


I've made sure the yolov3.cfg that is within my project matches up with the one on the web https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg which it does. If I change " [net] " to something else for example " [layer] " then the error will change to :



"(-212:Parsing error) Unknown layer type: layer in function
'ReadDarknetFromCfgStream'"


Almost as if either the cfg file is wrong or opencv is not reading it correctly.



The start of the config file looks like this :



[net]
# Testing
# batch=1
# subdivisions=1
# Training
batch=64
subdivisions=16
width=608
height=608
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.001
burn_in=1000
max_batches = 500200
policy=steps
steps=400000,450000
scales=.1,.1


which is where I assume the problem is.



My code for loading the net is :



const char * pathStart = gGetRootAppPath();
pathEnd = "/yolo/yolov3.cfg";
std::string modelConfiguration = pathStart + pathEnd;
pathEnd = "/yolo/yolov3.weights";
std::string modelWeights = pathStart + pathEnd;

//set up the neural network
cv::dnn::readNetFromDarknet(modelConfiguration,modelWeights);


Any help would be much appreciated.










share|improve this question


























  • try to use absolute path, dont use const char * pathStart = gGetRootAppPath()

    – gameon67
    Mar 28 at 0:16












  • thanks @gameon67, I've tried that but I'm still getting the same problem.

    – Joachim.A
    Mar 28 at 8:45

















0















I am attempting to use Yolov3 using OpenCV's (4.0.1) DNN Library on MacOs in C++. I am trying to use cv::dnn::readNetFromDarknet to load the yolov3.cfg file but I am getting this error :



"(-212:Parsing error) Unknown layer type: net in function
'ReadDarknetFromCfgStream'"


I've made sure the yolov3.cfg that is within my project matches up with the one on the web https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg which it does. If I change " [net] " to something else for example " [layer] " then the error will change to :



"(-212:Parsing error) Unknown layer type: layer in function
'ReadDarknetFromCfgStream'"


Almost as if either the cfg file is wrong or opencv is not reading it correctly.



The start of the config file looks like this :



[net]
# Testing
# batch=1
# subdivisions=1
# Training
batch=64
subdivisions=16
width=608
height=608
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.001
burn_in=1000
max_batches = 500200
policy=steps
steps=400000,450000
scales=.1,.1


which is where I assume the problem is.



My code for loading the net is :



const char * pathStart = gGetRootAppPath();
pathEnd = "/yolo/yolov3.cfg";
std::string modelConfiguration = pathStart + pathEnd;
pathEnd = "/yolo/yolov3.weights";
std::string modelWeights = pathStart + pathEnd;

//set up the neural network
cv::dnn::readNetFromDarknet(modelConfiguration,modelWeights);


Any help would be much appreciated.










share|improve this question


























  • try to use absolute path, dont use const char * pathStart = gGetRootAppPath()

    – gameon67
    Mar 28 at 0:16












  • thanks @gameon67, I've tried that but I'm still getting the same problem.

    – Joachim.A
    Mar 28 at 8:45













0












0








0








I am attempting to use Yolov3 using OpenCV's (4.0.1) DNN Library on MacOs in C++. I am trying to use cv::dnn::readNetFromDarknet to load the yolov3.cfg file but I am getting this error :



"(-212:Parsing error) Unknown layer type: net in function
'ReadDarknetFromCfgStream'"


I've made sure the yolov3.cfg that is within my project matches up with the one on the web https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg which it does. If I change " [net] " to something else for example " [layer] " then the error will change to :



"(-212:Parsing error) Unknown layer type: layer in function
'ReadDarknetFromCfgStream'"


Almost as if either the cfg file is wrong or opencv is not reading it correctly.



The start of the config file looks like this :



[net]
# Testing
# batch=1
# subdivisions=1
# Training
batch=64
subdivisions=16
width=608
height=608
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.001
burn_in=1000
max_batches = 500200
policy=steps
steps=400000,450000
scales=.1,.1


which is where I assume the problem is.



My code for loading the net is :



const char * pathStart = gGetRootAppPath();
pathEnd = "/yolo/yolov3.cfg";
std::string modelConfiguration = pathStart + pathEnd;
pathEnd = "/yolo/yolov3.weights";
std::string modelWeights = pathStart + pathEnd;

//set up the neural network
cv::dnn::readNetFromDarknet(modelConfiguration,modelWeights);


Any help would be much appreciated.










share|improve this question
















I am attempting to use Yolov3 using OpenCV's (4.0.1) DNN Library on MacOs in C++. I am trying to use cv::dnn::readNetFromDarknet to load the yolov3.cfg file but I am getting this error :



"(-212:Parsing error) Unknown layer type: net in function
'ReadDarknetFromCfgStream'"


I've made sure the yolov3.cfg that is within my project matches up with the one on the web https://github.com/pjreddie/darknet/blob/master/cfg/yolov3.cfg which it does. If I change " [net] " to something else for example " [layer] " then the error will change to :



"(-212:Parsing error) Unknown layer type: layer in function
'ReadDarknetFromCfgStream'"


Almost as if either the cfg file is wrong or opencv is not reading it correctly.



The start of the config file looks like this :



[net]
# Testing
# batch=1
# subdivisions=1
# Training
batch=64
subdivisions=16
width=608
height=608
channels=3
momentum=0.9
decay=0.0005
angle=0
saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.001
burn_in=1000
max_batches = 500200
policy=steps
steps=400000,450000
scales=.1,.1


which is where I assume the problem is.



My code for loading the net is :



const char * pathStart = gGetRootAppPath();
pathEnd = "/yolo/yolov3.cfg";
std::string modelConfiguration = pathStart + pathEnd;
pathEnd = "/yolo/yolov3.weights";
std::string modelWeights = pathStart + pathEnd;

//set up the neural network
cv::dnn::readNetFromDarknet(modelConfiguration,modelWeights);


Any help would be much appreciated.







opencv yolo darknet






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 17:09







Joachim.A

















asked Mar 27 at 13:59









Joachim.AJoachim.A

12 bronze badges




12 bronze badges















  • try to use absolute path, dont use const char * pathStart = gGetRootAppPath()

    – gameon67
    Mar 28 at 0:16












  • thanks @gameon67, I've tried that but I'm still getting the same problem.

    – Joachim.A
    Mar 28 at 8:45

















  • try to use absolute path, dont use const char * pathStart = gGetRootAppPath()

    – gameon67
    Mar 28 at 0:16












  • thanks @gameon67, I've tried that but I'm still getting the same problem.

    – Joachim.A
    Mar 28 at 8:45
















try to use absolute path, dont use const char * pathStart = gGetRootAppPath()

– gameon67
Mar 28 at 0:16






try to use absolute path, dont use const char * pathStart = gGetRootAppPath()

– gameon67
Mar 28 at 0:16














thanks @gameon67, I've tried that but I'm still getting the same problem.

– Joachim.A
Mar 28 at 8:45





thanks @gameon67, I've tried that but I'm still getting the same problem.

– Joachim.A
Mar 28 at 8:45












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55379051%2funknown-layer-type-net-in-function-when-loading-yolov3-using-opencvs-dnn-lib%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid …


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55379051%2funknown-layer-type-net-in-function-when-loading-yolov3-using-opencvs-dnn-lib%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?