File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ int main()
1313 std::tie (yoloDetector, params) = Initialize ();
1414
1515 std::filesystem::path current_path = std::filesystem::current_path ();
16- std::filesystem::path imgs_path = " /home/amigo/Documents/repos/hero_sam.bak/sam_inference/build/ images" ;
16+ std::filesystem::path imgs_path = current_path / " images" ;
1717 for (auto & i : std::filesystem::directory_iterator (imgs_path))
1818 {
1919 if (i.path ().extension () == " .jpg" || i.path ().extension () == " .png" || i.path ().extension () == " .jpeg" )
@@ -22,6 +22,12 @@ int main()
2222 cv::Mat img = cv::imread (img_path);
2323 std::vector<DL_RESULT> results;
2424 results = Detector (yoloDetector, img);
25+ for (const auto & result : results)
26+ {
27+ std::cout << " Image path: " << img_path << " \n "
28+ << " class id: " << result.classId << " \n "
29+ << " confidence: " << result.confidence << " \n " ;
30+ }
2531 }
2632 }
2733
You can’t perform that action at this time.
0 commit comments