duan8/yolov8/include/block.h
Rex 9a53b7f226
Yolov8 seg (#1381)
* v8_seg

* fix code style

* fix code style

* [优化代码风格]

* readme中增加yolov8_seg分割的使用

* 更新readme

* 更新readme

* [fix python infer bug]

* Update README.md

* Update README.md

---------

Co-authored-by: Wang Xinyu <shaywxy@gmail.com>
2023-10-17 20:59:21 +08:00

22 lines
1.1 KiB
C++

#pragma once
#include <map>
#include <vector>
#include <string>
#include "NvInfer.h"
std::map<std::string, nvinfer1::Weights> loadWeights(const std::string file);
nvinfer1::IElementWiseLayer* convBnSiLU(nvinfer1::INetworkDefinition* network, std::map<std::string, nvinfer1::Weights> weightMap,
nvinfer1::ITensor& input, int ch, int k, int s, int p, std::string lname);
nvinfer1::IElementWiseLayer* C2F(nvinfer1::INetworkDefinition* network, std::map<std::string, nvinfer1::Weights> weightMap,
nvinfer1::ITensor& input, int c1, int c2, int n, bool shortcut, float e, std::string lname);
nvinfer1::IElementWiseLayer* SPPF(nvinfer1::INetworkDefinition* network, std::map<std::string, nvinfer1::Weights> weightMap,
nvinfer1::ITensor& input, int c1, int c2, int k, std::string lname);
nvinfer1::IShuffleLayer* DFL(nvinfer1::INetworkDefinition* network, std::map<std::string, nvinfer1::Weights> weightMap,
nvinfer1::ITensor& input, int ch, int grid, int k, int s, int p, std::string lname);
nvinfer1::IPluginV2Layer* addYoLoLayer(nvinfer1::INetworkDefinition *network, std::vector<nvinfer1::IConcatenationLayer*> dets, bool is_segmentation = false);