YOLOv2_SpringEdition YOLOv2 C++ library. (Train,Detect both)Setup for train You need backup/
, bin/
, train/
, obj.cfg
, obj.data
, obj.names
, test.txt
, train.txt
. All files are included in my repository. You can execute YOLOv2/train.bat for training.
Setup for detect 1. Download pre-trained model and dll files.YOLOv2_SE_Detection_Example/download_pretrained_model_and_dll.bat
2. RunExample source is in my repository. You need only 1 header file and 2 dll files.
Recall : 0.481481
Precision : 0.722222
Average detection time : 0.0363674
FPS : 27.4971
ReferenceThe class YOLOv2
that in YOLOv2SE.h
has 3 method.
void Create(std::string weights,std::string cfg,std::string names); This method load trained model(weights ), network configuration(cfg ) and class naming file(names )
Parameter
weights : trained model path(e.g. "obj.weights")
cfg : network configuration file(e.g. "obj.cfg")
names : class naming file(e.g. "obj.names")
std::vector<BoxSE> Detect(cv::Mat img, float threshold);
std::vector<BoxSE> Detect(std::string file, float threshold);
std::vector<BoxSE> Detect(IplImage* img, float threshold); This method is detecting objects of file
,cv::Mat
or IplImage
.
void Release(); Release loaded network.
Technical issueOriginal YOLOv2 has so many dependencies. I removed that.
A YOLOv2_Train_SE.exe is automatically choosing multi-gpu training. and select backup weights.
Software requirementVisual Studio 2015
CUDA 8.0
Hardware requirement