Skip to content

Commit

Permalink
Add YOLOX C++ demo save functionality (#235)
Browse files Browse the repository at this point in the history
* Add saving functionality to C++ demo

* Updated saving to image inputs only

* Removed unnecessary bool
  • Loading branch information
ryan1288 authored Feb 28, 2024
1 parent f53754a commit 488fb8e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/object_detection_yolox/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ int main(int argc, char** argv)
tm.stop();
cout << "Inference time: " << tm.getTimeMilli() << " ms\n";
Mat img = visualize(predictions, frame, letterboxScale, tm.getFPS());
if (save && parser.has("input"))
{
imwrite("result.jpg", img);
}
if (vis)
{
imshow(kWinName, img);
Expand Down

0 comments on commit 488fb8e

Please sign in to comment.