Skip to content

DefTruth/YOLOP.lite.ai.toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

yolop.lite.ai.toolkit

ไฝฟ็”จLite.AI.ToolKit ๐Ÿš€๐Ÿš€๐ŸŒŸ C++ๅทฅๅ…ท็ฎฑๆฅ่ท‘YOLOP็š„ไธ€ไบ›ๆกˆไพ‹(https://github.com/DefTruth/lite.ai.toolkit) , ๅŒ…ๅซONNXRuntime C++ใ€MNNใ€NCNNๅ’ŒTNN็‰ˆๆœฌใ€‚

่‹ฅๆ˜ฏๆœ‰็”จ๏ผŒโค๏ธไธๅฆจ็ป™ไธชโญ๏ธ๐ŸŒŸๆ”ฏๆŒไธ€ไธ‹ๅง~ ๐Ÿ™ƒ๐Ÿคช๐Ÿ€

2. C++็‰ˆๆœฌๆบ็ 

YOLOP C++ ็‰ˆๆœฌ็š„ๆบ็ ๅŒ…ๅซONNXRuntimeใ€MNNใ€NCNNๅ’ŒTNNๅ››ไธช็‰ˆๆœฌ๏ผŒๅฏไปฅๅœจ lite.ai.toolkit ๅทฅๅ…ท็ฎฑไธญๆ‰พๅˆฐใ€‚ๆœฌ้กน็›ฎไธป่ฆไป‹็ปๅฆ‚ไฝ•ๅŸบไบŽ lite.ai.toolkit ๅทฅๅ…ท็ฎฑ๏ผŒ็›ดๆŽฅไฝฟ็”จYOLOPๆฅ่ท‘ๅ…จๆ™ฏๅˆ†ๅ‰ฒๅ’Œๆฃ€ๆต‹ใ€‚้œ€่ฆ่ฏดๆ˜Ž็š„ๆ˜ฏ๏ผŒๆœฌ้กน็›ฎๆ˜ฏๅŸบไบŽMacOSไธ‹็ผ–่ฏ‘็š„ liblite.ai.toolkit.v0.1.0.dylib ๆฅๅฎž็Žฐ็š„๏ผŒๅฏนไบŽไฝฟ็”จMacOS็š„็”จๆˆท๏ผŒๅฏไปฅ็›ดๆŽฅไธ‹่ฝฝๆœฌ้กน็›ฎๅŒ…ๅซ็š„liblite.ai.toolkit.v0.1.0ๅŠจๆ€ๅบ“ๅ’Œๅ…ถไป–ไพ่ต–ๅบ“่ฟ›่กŒไฝฟ็”จใ€‚่€Œ้žMacOS็”จๆˆท๏ผŒๅˆ™้œ€่ฆไปŽlite.ai.toolkit ไธญไธ‹่ฝฝๆบ็ ่ฟ›่กŒ็ผ–่ฏ‘ใ€‚lite.ai.toolkit c++ๅทฅๅ…ท็ฎฑ็›ฎๅ‰ๅŒ…ๅซ70+ๆต่กŒ็š„ๅผ€ๆบๆจกๅž‹ใ€‚

ONNXRuntime C++ใ€MNNใ€NCNNๅ’ŒTNN็‰ˆๆœฌ็š„ๆŽจ็†ๅฎž็Žฐๅ‡ๅทฒๆต‹่ฏ•้€š่ฟ‡๏ผŒๆฌข่ฟŽ็™ฝๅซ–~

3. ๆจกๅž‹ๆ–‡ไปถ

3.1 ONNXๆจกๅž‹ๆ–‡ไปถ

ๅฏไปฅไปŽๆˆ‘ๆไพ›็š„้“พๆŽฅไธ‹่ฝฝ (Baidu Drive code: 8gin)ใ€‚

Class Pretrained ONNX Files Rename or Converted From (Repo) Size
lite::cv::detection::YOLOP yolop-1280-1280.onnx YOLOP 30Mb
lite::cv::detection::YOLOP yolop-640-640.onnx YOLOP 30Mb
lite::cv::detection::YOLOP yolop-320-320.onnx YOLOP 30Mb

3.2 MNNๆจกๅž‹ๆ–‡ไปถ

MNNๆจกๅž‹ๆ–‡ไปถไธ‹่ฝฝๅœฐๅ€๏ผŒ(Baidu Drive code: 9v63)ใ€‚

Class Pretrained MNN Files Rename or Converted From (Repo) Size
lite::mnn::cv::detection::YOLOP yolop-320-320.mnn YOLOP 30Mb
lite::mnn::cv::detection::YOLOP yolop-640-640.mnn YOLOP 30Mb
lite::mnn::cv::detection::YOLOP yolop-1280-1280.mnn YOLOP 30Mb

3.3 TNNๆจกๅž‹ๆ–‡ไปถ

TNNๆจกๅž‹ๆ–‡ไปถไธ‹่ฝฝๅœฐๅ€๏ผŒ(Baidu Drive code: 6o6k)ใ€‚

Class Pretrained TNN Files Rename or Converted From (Repo) Size
lite::tnn::cv::detection::YOLOP yolop-320-320.opt.tnnproto&tnnmodel YOLOP 30Mb
lite::tnn::cv::detection::YOLOP yolop-640-640.opt.tnnproto&tnnmodel YOLOP 30Mb
lite::tnn::cv::detection::YOLOP yolop-1280-1280.opt.tnnproto&tnnmodel YOLOP 30Mb

3.4 NCNNๆจกๅž‹ๆ–‡ไปถ

TNNๆจกๅž‹ๆ–‡ไปถไธ‹่ฝฝๅœฐๅ€๏ผŒ(Baidu Drive code: sc7f)ใ€‚

Class Pretrained NCNN Files Rename or Converted From (Repo) Size
lite::ncnn::cv::detection::YOLOP yolop-640-640.opt.param&bin YOLOP 30Mb

4. ๆŽฅๅฃๆ–‡ๆกฃ

ๅœจlite.ai.toolkit ไธญ๏ผŒYOLOP็š„ๅฎž็Žฐ็ฑปไธบ๏ผš

class LITE_EXPORTS lite::cv::detection::YOLOP;
class LITE_EXPORTS lite::mnn::cv::detection::YOLOP;
class LITE_EXPORTS lite::tnn::cv::detection::YOLOP;
class LITE_EXPORTS lite::ncnn::cv::detection::YOLOP;

่ฏฅ็ฑปๅž‹็›ฎๅ‰ๅŒ…ๅซ1ๅ…ฌๅ…ฑๆŽฅๅฃdetect็”จไบŽ่ฟ›่กŒ็›ฎๆ ‡ๆฃ€ๆต‹ใ€‚

public:
    void detect(const cv::Mat &mat,
                std::vector<types::Boxf> &detected_boxes,
                types::SegmentContent &da_seg_content,
                types::SegmentContent &ll_seg_content,
                float score_threshold = 0.25f, float iou_threshold = 0.45f,
                unsigned int topk = 100, unsigned int nms_type = NMS::OFFSET);

detectๆŽฅๅฃ็š„่พ“ๅ…ฅๅ‚ๆ•ฐ่ฏดๆ˜Ž๏ผš

  • mat: cv::Mat็ฑปๅž‹๏ผŒBGRๆ ผๅผใ€‚
  • detected_boxes: Boxfๅ‘้‡๏ผŒๅŒ…ๅซ่ขซๆฃ€ๆต‹ๅˆฐ็š„่ฝฆ่พ†ๆก†๏ผŒBoxfไธญๅŒ…ๅซx1,y1,x2,y2,label,score็ญ‰ๆˆๅ‘˜
  • da_seg_content: SegmentContent็”จๆฅไฟๅญ˜้ข„ๆต‹็š„ๅฏ้ฉพ้ฉถๅŒบๅŸŸ็ป“ๆžœ
  • ll_seg_content: SegmentContent็”จๆฅไฟๅญ˜้ข„ๆต‹็š„่ˆช้“ๅŒบๅŸŸ็ป“ๆžœ
  • score_threshold๏ผšๅˆ†็ฑปๅพ—ๅˆ†๏ผˆ่ดจ้‡ๅพ—ๅˆ†๏ผ‰้˜ˆๅ€ผ๏ผŒ้ป˜่ฎค0.45๏ผŒๅฐไบŽ่ฏฅ้˜ˆๅ€ผ็š„ๆก†ๅฐ†่ขซไธขๅผƒใ€‚
  • iou_threshold๏ผšNMSไธญ็š„iou้˜ˆๅ€ผ๏ผŒ้ป˜่ฎค0.3ใ€‚
  • topk๏ผš้ป˜่ฎค100๏ผŒๅชไฟ็•™ๅ‰kไธชๆฃ€ๆต‹ๅˆฐ็š„็ป“ๆžœใ€‚
  • nms_type๏ผšNMS็ฎ—ๆณ•็š„็ฑปๅž‹๏ผŒ้ป˜่ฎคไธบไธๅŒ็š„็ฑปๅˆซๅ„่‡ชๅšNMSใ€‚

5. ไฝฟ็”จๆกˆไพ‹

5.1 ONNXRuntime็‰ˆๆœฌ

#include "lite/lite.h"

static void test_default()
{
    std::string onnx_path = "..//hub/onnx/cv/yolop-640-640.onnx";
    std::string test_img_path = "../resources/1.jpg";
    std::string save_det_path = "../logs/1_det.jpg";
    std::string save_da_path = "../logs/1_da.jpg";
    std::string save_ll_path = "../logs/1_ll.jpg";
    std::string save_merge_path = "../logs/1_merge.jpg";
    
    auto *yolop = new lite::cv::detection::YOLOP(onnx_path, 16); // 16 threads
    
    lite::types::SegmentContent da_seg_content;
    lite::types::SegmentContent ll_seg_content;
    std::vector<lite::types::Boxf> detected_boxes;
    cv::Mat img_bgr = cv::imread(test_img_path);
    yolop->detect(img_bgr, detected_boxes, da_seg_content, ll_seg_content);
    
    if (!detected_boxes.empty() && da_seg_content.flag && ll_seg_content.flag)
    {
        // boxes.
        cv::Mat img_det = img_bgr.clone();
        lite::utils::draw_boxes_inplace(img_det, detected_boxes);
        cv::imwrite(save_det_path, img_det);
        std::cout << "Saved " << save_det_path << " done!" << "\n";
        // da && ll seg
        cv::imwrite(save_da_path, da_seg_content.class_mat);
        cv::imwrite(save_ll_path, ll_seg_content.class_mat);
        std::cout << "Saved " << save_da_path << " done!" << "\n";
        std::cout << "Saved " << save_ll_path << " done!" << "\n";
        // merge
        cv::Mat img_merge = img_bgr.clone();
        cv::Mat color_seg = da_seg_content.color_mat + ll_seg_content.color_mat;
        
        cv::addWeighted(img_merge, 0.5, color_seg, 0.5, 0., img_merge);
        lite::utils::draw_boxes_inplace(img_merge, detected_boxes);
        cv::imwrite(save_merge_path, img_merge);
        std::cout << "Saved " << save_merge_path << " done!" << "\n";
        
        // label
        if (!da_seg_content.names_map.empty() && !ll_seg_content.names_map.empty())
        {
        
            for (auto it = da_seg_content.names_map.begin(); it != da_seg_content.names_map.end(); ++it)
            {
                std::cout << "Default Version Detected Label: "
                << it->first << " Name: " << it->second << std::endl;
            }
            
            for (auto it = ll_seg_content.names_map.begin(); it != ll_seg_content.names_map.end(); ++it)
            {
                std::cout << "Default Version Detected Label: "
                << it->first << " Name: " << it->second << std::endl;
            }
            
        }
    }
    
    delete yolop;
}

5.2 MNN็‰ˆๆœฌ

#include "lite/lite.h"

static void test_mnn()
{
#ifdef ENABLE_MNN
    std::string mnn_path = "../hub/mnn/cv/yolop-640-640.mnn";
    std::string test_img_path = "../resources/1.jpg";
    std::string save_det_path = "../logs/1_det_mnn.jpg";
    std::string save_da_path = "../logs/1_da_mnn.jpg";
    std::string save_ll_path = "../logs/1_ll_mnn.jpg";
    std::string save_merge_path = "../logs/1_merge_mnn.jpg";
    
    auto *yolop = new lite::mnn::cv::detection::YOLOP(mnn_path, 16); // 16 threads
    
    lite::types::SegmentContent da_seg_content;
    lite::types::SegmentContent ll_seg_content;
    std::vector<lite::types::Boxf> detected_boxes;
    cv::Mat img_bgr = cv::imread(test_img_path);
    yolop->detect(img_bgr, detected_boxes, da_seg_content, ll_seg_content);
    
    if (!detected_boxes.empty() && da_seg_content.flag && ll_seg_content.flag)
    {
        // boxes.
        cv::Mat img_det = img_bgr.clone();
        lite::utils::draw_boxes_inplace(img_det, detected_boxes);
        cv::imwrite(save_det_path, img_det);
        std::cout << "Saved " << save_det_path << " done!" << "\n";
        // da && ll seg
        cv::imwrite(save_da_path, da_seg_content.class_mat);
        cv::imwrite(save_ll_path, ll_seg_content.class_mat);
        std::cout << "Saved " << save_da_path << " done!" << "\n";
        std::cout << "Saved " << save_ll_path << " done!" << "\n";
        // merge
        cv::Mat img_merge = img_bgr.clone();
        cv::Mat color_seg = da_seg_content.color_mat + ll_seg_content.color_mat;
        
        cv::addWeighted(img_merge, 0.5, color_seg, 0.5, 0., img_merge);
        lite::utils::draw_boxes_inplace(img_merge, detected_boxes);
        cv::imwrite(save_merge_path, img_merge);
        std::cout << "Saved " << save_merge_path << " done!" << "\n";
        
        // label
        if (!da_seg_content.names_map.empty() && !ll_seg_content.names_map.empty())
        {
        
            for (auto it = da_seg_content.names_map.begin(); it != da_seg_content.names_map.end(); ++it)
            {
                std::cout << "MNN Version Detected Label: "
                << it->first << " Name: " << it->second << std::endl;
            }
            
            for (auto it = ll_seg_content.names_map.begin(); it != ll_seg_content.names_map.end(); ++it)
            {
                std::cout << "MNN Version Detected Label: "
                << it->first << " Name: " << it->second << std::endl;
            }
        
        }
    }
    
    delete yolop;
#endif
}

5.3 TNN็‰ˆๆœฌ

#include "lite/lite.h"

static void test_tnn()
{
#ifdef ENABLE_TNN
    std::string proto_path = "../hub/tnn/cv/yolop-640-640.opt.tnnproto";
    std::string model_path = "../hub/tnn/cv/yolop-640-640.opt.tnnmodel";
    std::string test_img_path = "../resources/1.jpg";
    std::string save_det_path = "../logs/1_det_tnn.jpg";
    std::string save_da_path = "../logs/1_da_tnn.jpg";
    std::string save_ll_path = "../logs/1_ll_tnn.jpg";
    std::string save_merge_path = "../logs/1_merge_tnn.jpg";
    
    auto *yolop = new lite::tnn::cv::detection::YOLOP(proto_path, model_path, 16); // 16 threads
    
    lite::types::SegmentContent da_seg_content;
    lite::types::SegmentContent ll_seg_content;
    std::vector<lite::types::Boxf> detected_boxes;
    cv::Mat img_bgr = cv::imread(test_img_path);
    yolop->detect(img_bgr, detected_boxes, da_seg_content, ll_seg_content);
    
    if (!detected_boxes.empty() && da_seg_content.flag && ll_seg_content.flag)
    {
        // boxes.
        cv::Mat img_det = img_bgr.clone();
        lite::utils::draw_boxes_inplace(img_det, detected_boxes);
        cv::imwrite(save_det_path, img_det);
        std::cout << "Saved " << save_det_path << " done!" << "\n";
        // da && ll seg
        cv::imwrite(save_da_path, da_seg_content.class_mat);
        cv::imwrite(save_ll_path, ll_seg_content.class_mat);
        std::cout << "Saved " << save_da_path << " done!" << "\n";
        std::cout << "Saved " << save_ll_path << " done!" << "\n";
        // merge
        cv::Mat img_merge = img_bgr.clone();
        cv::Mat color_seg = da_seg_content.color_mat + ll_seg_content.color_mat;
        
        cv::addWeighted(img_merge, 0.5, color_seg, 0.5, 0., img_merge);
        lite::utils::draw_boxes_inplace(img_merge, detected_boxes);
        cv::imwrite(save_merge_path, img_merge);
        std::cout << "Saved " << save_merge_path << " done!" << "\n";
        
        // label
        if (!da_seg_content.names_map.empty() && !ll_seg_content.names_map.empty())
        {
        
            for (auto it = da_seg_content.names_map.begin(); it != da_seg_content.names_map.end(); ++it)
            {
                std::cout << "TNN Version Detected Label: "
                << it->first << " Name: " << it->second << std::endl;
            }
        
            for (auto it = ll_seg_content.names_map.begin(); it != ll_seg_content.names_map.end(); ++it)
            {
                std::cout << "TNN Version Detected Label: "
                << it->first << " Name: " << it->second << std::endl;
            }
        
        }
    }
    
    delete yolop;
#endif
}

5.4 NCNN็‰ˆๆœฌ

#include "lite/lite.h"

static void test_ncnn()
{
#ifdef ENABLE_NCNN
    std::string param_path = "../hub/ncnn/cv/yolop-640-640.opt.param";
    std::string bin_path = "../hub/ncnn/cv/yolop-640-640.opt.bin";
    std::string test_img_path = "../resources/1.jpg";
    std::string save_det_path = "../logs/1_det_ncnn.jpg";
    std::string save_da_path = "../logs/1_da_ncnn.jpg";
    std::string save_ll_path = "../logs/1_ll_ncnn.jpg";
    std::string save_merge_path = "../logs/1_merge_ncnn.jpg";
    
    auto *yolop = new lite::ncnn::cv::detection::YOLOP(param_path, bin_path, 16); // 16 threads
    
    lite::types::SegmentContent da_seg_content;
    lite::types::SegmentContent ll_seg_content;
    std::vector<lite::types::Boxf> detected_boxes;
    cv::Mat img_bgr = cv::imread(test_img_path);
    yolop->detect(img_bgr, detected_boxes, da_seg_content, ll_seg_content);
    
    if (!detected_boxes.empty() && da_seg_content.flag && ll_seg_content.flag)
    {
        // boxes.
        cv::Mat img_det = img_bgr.clone();
        lite::utils::draw_boxes_inplace(img_det, detected_boxes);
        cv::imwrite(save_det_path, img_det);
        std::cout << "Saved " << save_det_path << " done!" << "\n";
        // da && ll seg
        cv::imwrite(save_da_path, da_seg_content.class_mat);
        cv::imwrite(save_ll_path, ll_seg_content.class_mat);
        std::cout << "Saved " << save_da_path << " done!" << "\n";
        std::cout << "Saved " << save_ll_path << " done!" << "\n";
        // merge
        cv::Mat img_merge = img_bgr.clone();
        cv::Mat color_seg = da_seg_content.color_mat + ll_seg_content.color_mat;
        
        cv::addWeighted(img_merge, 0.5, color_seg, 0.5, 0., img_merge);
        lite::utils::draw_boxes_inplace(img_merge, detected_boxes);
        cv::imwrite(save_merge_path, img_merge);
        std::cout << "Saved " << save_merge_path << " done!" << "\n";
        
        // label
        if (!da_seg_content.names_map.empty() && !ll_seg_content.names_map.empty())
        {
        
            for (auto it = da_seg_content.names_map.begin(); it != da_seg_content.names_map.end(); ++it)
            {
                std::cout << "NCNN Version Detected Label: "
                << it->first << " Name: " << it->second << std::endl;
            }
        
            for (auto it = ll_seg_content.names_map.begin(); it != ll_seg_content.names_map.end(); ++it)
            {
                std::cout << "NCNN Version Detected Label: "
                << it->first << " Name: " << it->second << std::endl;
            }
        
        }
    }
    
    delete yolop;
#endif
}
  • ่พ“ๅ‡บ็ป“ๆžœไธบ:

6. ็ผ–่ฏ‘่ฟ่กŒ

ๅœจMacOSไธ‹ๅฏไปฅ็›ดๆŽฅ็ผ–่ฏ‘่ฟ่กŒๆœฌ้กน็›ฎ๏ผŒๆ— ้œ€ไธ‹่ฝฝๅ…ถไป–ไพ่ต–ๅบ“ใ€‚ๅ…ถไป–็ณป็ปŸๅˆ™้œ€่ฆไปŽlite.ai.toolkit ไธญไธ‹่ฝฝๆบ็ ๅ…ˆ็ผ–่ฏ‘lite.ai.toolkit.v0.1.0ๅŠจๆ€ๅบ“ใ€‚

git clone --depth=1 https://github.com/DefTruth/yolop.lite.ai.toolkit.git
cd yolop.lite.ai.toolkit 
sh ./build.sh
  • CMakeLists.txt่ฎพ็ฝฎ
cmake_minimum_required(VERSION 3.17)
project(yolop.lite.ai.toolkit)

set(CMAKE_CXX_STANDARD 11)

# setting up lite.ai.toolkit
set(LITE_AI_DIR ${CMAKE_SOURCE_DIR}/lite.ai.toolkit)
set(LITE_AI_INCLUDE_DIR ${LITE_AI_DIR}/include)
set(LITE_AI_LIBRARY_DIR ${LITE_AI_DIR}/lib)
include_directories(${LITE_AI_INCLUDE_DIR})
link_directories(${LITE_AI_LIBRARY_DIR})

set(OpenCV_LIBS
        opencv_highgui
        opencv_core
        opencv_imgcodecs
        opencv_imgproc
        opencv_video
        opencv_videoio
        )
# add your executable
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/examples/build)

add_executable(lite_yolop examples/test_lite_yolop.cpp)
target_link_libraries(lite_yolop
        lite.ai.toolkit
        onnxruntime
        MNN  # need, if built lite.ai.toolkit with ENABLE_MNN=ON,  default OFF
        ncnn # need, if built lite.ai.toolkit with ENABLE_NCNN=ON, default OFF
        TNN  # need, if built lite.ai.toolkit with ENABLE_TNN=ON,  default OFF
        ${OpenCV_LIBS})  # link lite.ai.toolkit & other libs.
  • building && testing information:
[ 50%] Building CXX object CMakeFiles/lite_yolop.dir/examples/test_lite_yolop.cpp.o
[100%] Linking CXX executable lite_yolop
[100%] Built target lite_yolop
Testing Start ...
LITEORT_DEBUG LogId: ..//hub/onnx/cv/yolop-640-640.onnx
=============== Input-Dims ==============
input_node_dims: 1
input_node_dims: 3
input_node_dims: 640
input_node_dims: 640
=============== Output-Dims ==============
Output: 0 Name: det_out Dim: 0 :1
Output: 0 Name: det_out Dim: 1 :25200
Output: 0 Name: det_out Dim: 2 :6
Output: 1 Name: drive_area_seg Dim: 0 :1
Output: 1 Name: drive_area_seg Dim: 1 :2
Output: 1 Name: drive_area_seg Dim: 2 :640
Output: 1 Name: drive_area_seg Dim: 3 :640
Output: 2 Name: lane_line_seg Dim: 0 :1
Output: 2 Name: lane_line_seg Dim: 1 :2
Output: 2 Name: lane_line_seg Dim: 2 :640
Output: 2 Name: lane_line_seg Dim: 3 :640
========================================
detected num_anchors: 25200
generate_bboxes num: 62
Saved ../logs/1_det.jpg done!
Saved ../logs/1_da.jpg done!
Saved ../logs/1_ll.jpg done!
Saved ../logs/1_merge.jpg done!
Default Version Detected Label: 255 Name: drivable area
Default Version Detected Label: 255 Name: lane line
LITEORT_DEBUG LogId: ..//hub/onnx/cv/yolop-640-640.onnx
=============== Input-Dims ==============
input_node_dims: 1
input_node_dims: 3
input_node_dims: 640
input_node_dims: 640
=============== Output-Dims ==============
Output: 0 Name: det_out Dim: 0 :1
Output: 0 Name: det_out Dim: 1 :25200
Output: 0 Name: det_out Dim: 2 :6
Output: 1 Name: drive_area_seg Dim: 0 :1
Output: 1 Name: drive_area_seg Dim: 1 :2
Output: 1 Name: drive_area_seg Dim: 2 :640
Output: 1 Name: drive_area_seg Dim: 3 :640
Output: 2 Name: lane_line_seg Dim: 0 :1
Output: 2 Name: lane_line_seg Dim: 1 :2
Output: 2 Name: lane_line_seg Dim: 2 :640
Output: 2 Name: lane_line_seg Dim: 3 :640
========================================
detected num_anchors: 25200
generate_bboxes num: 62
Saved ../logs/1_det_onnx.jpg done!
Saved ../logs/1_da_onnx.jpg done!
Saved ../logs/1_ll_onnx.jpg done!
Saved ../logs/1_merge_onnx.jpg done!
ONNXRuntime Version Detected Label: 255 Name: drivable area
ONNXRuntime Version Detected Label: 255 Name: lane line
LITEMNN_DEBUG LogId: ../hub/mnn/cv/yolop-640-640.mnn
=============== Input-Dims ==============
        **Tensor shape**: 1, 3, 640, 640, 
Dimension Type: (CAFFE/PyTorch/ONNX)NCHW
=============== Output-Dims ==============
getSessionOutputAll done!
Output: det_out:        **Tensor shape**: 1, 25200, 6, 
Output: drive_area_seg:         **Tensor shape**: 1, 2, 640, 640, 
Output: lane_line_seg:  **Tensor shape**: 1, 2, 640, 640, 
========================================
detected num_anchors: 25200
generate_bboxes num: 62
Saved ../logs/1_det_mnn.jpg done!
Saved ../logs/1_da_mnn.jpg done!
Saved ../logs/1_ll_mnn.jpg done!
Saved ../logs/1_merge_mnn.jpg done!
MNN Version Detected Label: 255 Name: drivable area
MNN Version Detected Label: 255 Name: lane line
LITENCNN_DEBUG LogId: ../hub/ncnn/cv/yolop-640-640.opt.param
=============== Input-Dims ==============
Input: images: shape: c=0 h=0 w=0
=============== Output-Dims ==============
Output: det_stride_8: shape: c=0 h=0 w=0
Output: det_stride_16: shape: c=0 h=0 w=0
Output: det_stride_32: shape: c=0 h=0 w=0
Output: drive_area_seg: shape: c=0 h=0 w=0
Output: lane_line_seg: shape: c=0 h=0 w=0
========================================
generate_bboxes num: 62
Saved ../logs/1_det_ncnn.jpg done!
Saved ../logs/1_da_ncnn.jpg done!
Saved ../logs/1_ll_ncnn.jpg done!
Saved ../logs/1_merge_ncnn.jpg done!
NCNN Version Detected Label: 255 Name: drivable area
NCNN Version Detected Label: 255 Name: lane line
LITETNN_DEBUG LogId: ../hub/tnn/cv/yolop-640-640.opt.tnnproto
=============== Input-Dims ==============
images: [1 3 640 640 ]
Input Data Format: NCHW
=============== Output-Dims ==============
det_out: [1 25200 6 ]
drive_area_seg: [1 2 640 640 ]
lane_line_seg: [1 2 640 640 ]
========================================
detected num_anchors: 25200
generate_bboxes num: 62
Saved ../logs/1_det_tnn.jpg done!
Saved ../logs/1_da_tnn.jpg done!
Saved ../logs/1_ll_tnn.jpg done!
Saved ../logs/1_merge_tnn.jpg done!
TNN Version Detected Label: 255 Name: drivable area
TNN Version Detected Label: 255 Name: lane line
Testing Successful !

About

๐Ÿš€๐Ÿš€๐ŸŒŸ YOLOP with ONNXRuntime C++/MNN/TNN/NCNN (https://github.com/DefTruth/lite.ai.toolkit)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published