Giter Site home page Giter Site logo

Comments (3)

mxsurui avatar mxsurui commented on June 27, 2024

大佬你好,我将yolov4模型转化成了nnie wk文件,利用nnie-lite进行推理的时候,我修改了anchors部分,修改如下:
image
请问
image这个函数还修改吗?如果需要,怎么修改呢?

你给的图片我看不到,yolov4和yolov3的框架是相同的,不过是对v3的子结构进行了改进,anchor部分的解析是一样的

from nnie-lite.

jcyhcs avatar jcyhcs commented on June 27, 2024
**parseYolov3Feature**(img_width,
                   img_height,
                   num_classes,
                   kBoxPerCell,
                   feature_index0,
                   conf_threshold,
                   anchors[0],
                   output0,
                   ids,
                   boxes,
                   confidences);

就是这个函数,您的意思这个函数是用来解析anchors的,对吗?故在yolov4下也不用做任何修改,
但是yolov4的anchors和v3的不同,这个需要根据cfg文件修改吧,我修改如下:
const std::vector<std::vectorcv::Size2f> anchors = {
{{142, 110}, {192, 243}, {459, 401}},
{{36, 75}, {76, 55}, {72, 146}},
{{12, 16}, {19, 36}, {40, 28}}};

from nnie-lite.

mxsurui avatar mxsurui commented on June 27, 2024
**parseYolov3Feature**(img_width,
                   img_height,
                   num_classes,
                   kBoxPerCell,
                   feature_index0,
                   conf_threshold,
                   anchors[0],
                   output0,
                   ids,
                   boxes,
                   confidences);

就是这个函数,您的意思这个函数是用来解析anchors的,对吗?故在yolov4下也不用做任何修改,
但是yolov4的anchors和v3的不同,这个需要根据cfg文件修改吧,我修改如下:
const std::vectorstd::vectorcv::Size2f anchors = {
{{142, 110}, {192, 243}, {459, 401}},
{{36, 75}, {76, 55}, {72, 146}},
{{12, 16}, {19, 36}, {40, 28}}};

不同的数据,根据目标大小预设的anchor框,肯定是需要改的,这样改可以。那个函数就是根据模型计算出的anchor的偏移量,结合anchor计算出实际box的函数。

from nnie-lite.

Related Issues (17)

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.