Detectron2_CenterNetv2

所属分类:人工智能/神经网络/深度学习
开发工具:C++
文件大小:0KB
下载次数:0
上传日期:2021-12-17 08:23:20
上 传 者sh-1993
说明:  Detectron2 Libtorch C++中心网2
(Detectron2 Libtorch C++ centernetv2)

文件列表:
Debug/ (0, 2021-12-17)
Debug/CfgDefaults.yaml (6285, 2021-12-17)
Detectron2/ (0, 2021-12-17)
Detectron2/Base.cpp (18, 2021-12-17)
Detectron2/Base.h (492, 2021-12-17)
Detectron2/CfgDefaults.yaml (5114, 2021-12-17)
Detectron2/Data/ (0, 2021-12-17)
Detectron2/Data/BuiltinDataset.cpp (10833, 2021-12-17)
Detectron2/Data/BuiltinDataset.h (4646, 2021-12-17)
Detectron2/Data/BuiltinMeta.cpp (16710, 2021-12-17)
Detectron2/Data/BuiltinMeta.h (683, 2021-12-17)
Detectron2/Data/MetadataCatalog.cpp (772, 2021-12-17)
Detectron2/Data/MetadataCatalog.h (2321, 2021-12-17)
Detectron2/Data/ResizeShortestEdge.cpp (1512, 2021-12-17)
Detectron2/Data/ResizeShortestEdge.h (1422, 2021-12-17)
Detectron2/Data/ResizeTransform.cpp (2250, 2021-12-17)
Detectron2/Data/ResizeTransform.h (935, 2021-12-17)
Detectron2/Data/Transform.cpp (1333, 2021-12-17)
Detectron2/Data/Transform.h (6173, 2021-12-17)
Detectron2/Data/TransformGen.cpp (849, 2021-12-17)
Detectron2/Data/TransformGen.h (1477, 2021-12-17)
Detectron2/Detectron2.cpp (1703, 2021-12-17)
Detectron2/Detectron2.h (3151, 2021-12-17)
Detectron2/Detectron2.vcxproj (27007, 2021-12-17)
Detectron2/Detectron2.vcxproj.filters (32777, 2021-12-17)
Detectron2/Detectron2.vcxproj.user (217, 2021-12-17)
Detectron2/Detectron2Includes.h (438, 2021-12-17)
Detectron2/Import/ (0, 2021-12-17)
Detectron2/Import/.idea/ (0, 2021-12-17)
Detectron2/Import/.idea/Import.iml (395, 2021-12-17)
Detectron2/Import/.idea/inspectionProfiles/ (0, 2021-12-17)
Detectron2/Import/.idea/inspectionProfiles/profiles_settings.xml (174, 2021-12-17)
Detectron2/Import/.idea/misc.xml (192, 2021-12-17)
Detectron2/Import/.idea/modules.xml (264, 2021-12-17)
Detectron2/Import/.idea/vcs.xml (186, 2021-12-17)
Detectron2/Import/Baseline/ (0, 2021-12-17)
Detectron2/Import/Baseline/model_final_997cc7.cpp (41333, 2021-12-17)
Detectron2/Import/Baseline/model_final_a3ec72.cpp (40859, 2021-12-17)
... ...

# Detectron2_CentenNetv2 # CentenNetv2 train and test CentenNetv2 test - ![](https://github.com/ttanzhiqiang/Detectron2_CenterNetv2/blob/master/./output/result.jpg) ## INTRODUCTION you have the trained model file from the libtorch(detectron2) ## windows10 - dependency : libtorch 1.8.1 , cuda 11.1 , cudnn 8.0.4 , opencv4.3.0 , vs2019 , YAML_CPP - build: open Detectron2_Project.sln file Detectron2_test.cpp : test Detectron2_train.cpp : train ## Add Feature - dla - cascade - evaluate(map) ![](https://github.com/ttanzhiqiang/Detectron2_CenterNetv2/blob/master/./output/map.PNG) ## Model and 3rdparty data:https://share.weiyun.com/io1NaIqT or https://drive.google.com/drive/folders/1bB0YqxwIA_oXjest2R4LMFmROzT2LIpF?usp=sharing model : https://share.weiyun.com/qF9G5vaA or https://drive.google.com/drive/folders/1DDi-F4PQKN8EhnpQX_MNF5A_TQIsXaTC?usp=sharing 3rdparty:YAML_CPP/opencv4.3.0/libtorch-1.8.1 ## Train API ```c++ namespace Detectron2 { class Trainer { public: struct Options { std::string config_file // path to config file = "configs/quick_schedules/mask_rcnn_R_50_FPN_inference_acc_test.yaml"; bool webcam = false; std::vector input; CfgNode::OptionList opts; float confidence_threshold = 0.5; }; static void start(const Options& options); static CfgNode setup_cfg(const std::string& config_file, const CfgNode::OptionList& opts, float confidence_threshold); void run_train(); public: Trainer(const CfgNode& cfg, ColorMode instance_mode = ColorMode::kIMAGE, bool parallel = false); private: Metadata m_metadata; torch::Device m_cpu_device; ColorMode m_instance_mode; bool m_parallel; std::shared_ptr m_TrainerBase; }; } ``` ## test API ```c++ namespace Detectron2 { class VisualizationDemo { public: struct Options { std::string config_file // path to config file = "configs/quick_schedules/mask_rcnn_R_50_FPN_inference_acc_test.yaml"; bool webcam = false; std::string video_input; std::vector input; std::string output; CfgNode::OptionList opts; float confidence_threshold = 0.5; }; static void start(const Options &options); static CfgNode setup_cfg(const std::string &config_file, const CfgNode::OptionList &opts, float confidence_threshold); public: VisualizationDemo(const CfgNode &cfg, ColorMode instance_mode = ColorMode::kIMAGE, bool parallel = false); std::tuple run_on_image(torch::Tensor image); void run_on_video(cv::VideoCapture &video, std::function vis_frame_processor); void analyze_on_video(cv::VideoCapture &video, VideoAnalyzer &analyzer); private: Metadata m_metadata; torch::Device m_cpu_device; ColorMode m_instance_mode; bool m_parallel; std::shared_ptr m_predictor; }; } ``` ## REFERENCE https://github.com/LESSuseLESS/d2.git ## Contact

近期下载者

相关文件


收藏者