- Remove pthread,opencv dependency.
- You need only 1 files for YOLO deep-learning.
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.
YOLOv2_SE_Detection_Example/download_pretrained_model_and_dll.bat
Example 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
The 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
.
- Parameter
- file : image file path
- img : 3-channel image.
- threshold : It removes predictive boxes if there score is less than threshold.
void Release();
Release loaded network.
Original YOLOv2 has so many dependencies. I removed that.
A YOLOv2_Train_SE.exe is automatically choosing multi-gpu training. and select backup weights.
- Visual Studio 2015
- CUDA 8.0