diff --git a/yolov9/include/block.h b/yolov9/include/block.h index 9369fa9a..3b02d4bc 100644 --- a/yolov9/include/block.h +++ b/yolov9/include/block.h @@ -1,12 +1,12 @@ #include "config.h" #include "yololayer.h" -#include -#include -#include #include #include #include +#include +#include +#include using namespace nvinfer1; @@ -15,17 +15,30 @@ using namespace nvinfer1; void PrintDim(const ILayer* layer, std::string log = ""); std::map loadWeights(const std::string file); int get_width(int x, float gw, int divisor = 8); -int get_depth(int x, float gd) ; -ILayer* Proto(INetworkDefinition* network, std::map& weightMap, ITensor& input, int c_, int c2, std::string lname); +int get_depth(int x, float gd); +ILayer* Proto(INetworkDefinition* network, std::map& weightMap, ITensor& input, int c_, int c2, + std::string lname); std::vector> getAnchors(std::map& weightMap, std::string lname); // ---------------------------------------------------------------- -nvinfer1::ILayer* convBnSiLU(nvinfer1::INetworkDefinition* network, std::map& weightMap, nvinfer1::ITensor& input, int ch, int k, int s, int p, std::string lname, int g=1); -ILayer* RepNCSPELAN4(INetworkDefinition *network, std::map& weightMap, ITensor& input, int c1, int c2, int c3, int c4, int c5, std::string lname); -ILayer* ADown(INetworkDefinition *network, std::map& weightMap, ITensor& input, int c2, std::string lname); -std::vector CBLinear(INetworkDefinition *network, std::map& weightMap, ITensor& input, std::vector c2s, int k, int s, int p, int g, std::string lname); -ILayer* CBFuse(INetworkDefinition *network, std::vector> input, std::vector idx, std::vector strides); -ILayer* SPPELAN(INetworkDefinition *network, std::map& weightMap, ITensor& input, int c1, int c2, int c3, std::string lname); -std::vector DualDDetect(INetworkDefinition *network, std::map& weightMap, std::vector dets, int cls, std::vector ch, std::string lname); -nvinfer1::IPluginV2Layer* addYoLoLayer(nvinfer1::INetworkDefinition *network, std::vector dets, bool is_segmentation); -nvinfer1::IShuffleLayer* DFL(nvinfer1::INetworkDefinition* network, std::map weightMap, nvinfer1::ITensor& input, int ch, int k, int s, int p, std::string lname); -nvinfer1::ILayer* convBnNoAct(nvinfer1::INetworkDefinition* network, std::map& weightMap, nvinfer1::ITensor& input, int ch, int k, int s, int p, std::string lname, int g); +nvinfer1::ILayer* convBnSiLU(nvinfer1::INetworkDefinition* network, std::map& weightMap, + nvinfer1::ITensor& input, int ch, int k, int s, int p, std::string lname, int g = 1); +ILayer* RepNCSPELAN4(INetworkDefinition* network, std::map& weightMap, ITensor& input, int c1, + int c2, int c3, int c4, int c5, std::string lname); +ILayer* ADown(INetworkDefinition* network, std::map& weightMap, ITensor& input, int c2, + std::string lname); +std::vector CBLinear(INetworkDefinition* network, std::map& weightMap, ITensor& input, + std::vector c2s, int k, int s, int p, int g, std::string lname); +ILayer* CBFuse(INetworkDefinition* network, std::vector> input, std::vector idx, + std::vector strides); +ILayer* SPPELAN(INetworkDefinition* network, std::map& weightMap, ITensor& input, int c1, int c2, + int c3, std::string lname); +std::vector DualDDetect(INetworkDefinition* network, std::map& weightMap, + std::vector dets, int cls, std::vector ch, + std::string lname); +nvinfer1::IPluginV2Layer* addYoLoLayer(nvinfer1::INetworkDefinition* network, + std::vector dets, bool is_segmentation); +nvinfer1::IShuffleLayer* DFL(nvinfer1::INetworkDefinition* network, std::map weightMap, + nvinfer1::ITensor& input, int ch, int k, int s, int p, std::string lname); +nvinfer1::ILayer* convBnNoAct(nvinfer1::INetworkDefinition* network, + std::map& weightMap, nvinfer1::ITensor& input, int ch, + int k, int s, int p, std::string lname, int g);