Skip to content

Commit 488fb8e

Browse files
authored
Add YOLOX C++ demo save functionality (#235)
* Add saving functionality to C++ demo * Updated saving to image inputs only * Removed unnecessary bool
1 parent f53754a commit 488fb8e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

models/object_detection_yolox/demo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ int main(int argc, char** argv)
306306
tm.stop();
307307
cout << "Inference time: " << tm.getTimeMilli() << " ms\n";
308308
Mat img = visualize(predictions, frame, letterboxScale, tm.getFPS());
309+
if (save && parser.has("input"))
310+
{
311+
imwrite("result.jpg", img);
312+
}
309313
if (vis)
310314
{
311315
imshow(kWinName, img);

0 commit comments

Comments
 (0)