11#include " YOLOv3SE.h"
22#include < chrono>
3+ #include < iostream>
34void Yolo3Test (std::string weights, std::string cfg,std::string names) {
45 YOLOv3 detector;
56 detector.Create (weights,cfg,names);
@@ -21,13 +22,13 @@ void Yolo3Test(std::string weights, std::string cfg,std::string names) {
2122 t_end = std::chrono::system_clock::now ();
2223 diff = t_end - t_beg;
2324 std::cout << " FPS : " << 1.0 / diff.count () << " \t " << diff.count () << std::endl;
24- // continue;
25+ continue ;
2526 for (auto &box : boxes) {
2627 cv::putText (img, detector.Names (box.m_class ), box.tl (), cv::FONT_HERSHEY_SIMPLEX, 1.0 , colors[box.m_class ], 2 );
2728 cv::rectangle (img, box, colors[box.m_class ], 2 );
2829 }
2930 cv::imshow (" original" , img);
30- if (cv::waitKey (0 ) == 27 ) {
31+ if (cv::waitKey (10 ) == 27 ) {
3132 break ;
3233 }
3334 }
@@ -62,7 +63,8 @@ int main() {
6263 // Yolo3Test("yolov3_darknet53.weights","yolov3_darknet53_coco.cfg","coco.names");
6364
6465 // /Test YOLOv3 based on darknet53 with SPP(spatial pyramid pooling)
65- Yolo3Test (" yolov3_darknet53_spp.weights" , " yolov3_darknet53_spp_coco.cfg" , " coco.names" );
66+ Yolo3Test (" yolov3_darknet53.weights" , " yolov3_darknet53_coco.cfg" , " coco.names" );
67+ // Yolo3Test("yolov3_darknet53_spp.weights", "yolov3_darknet53_spp_coco.cfg", "coco.names");
6668
6769 // /Test Classifier
6870 // ClassifyTest();
0 commit comments