Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spelling, spacing, and unused variables #236

Merged
merged 5 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion models/object_detection_nanodet/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def vis(preds, res_img, letterbox_scale, fps=None):
img = vis(preds, image, letterbox_scale)

if args.save:
print('Resutls saved to result.jpg\n')
print('Results saved to result.jpg\n')
cv.imwrite('result.jpg', img)

if args.vis:
Expand Down
4 changes: 2 additions & 2 deletions models/object_detection_yolox/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class YoloX {
boxesXYXY[r].height = boxes_xyxy.at<float>(r, 3);
}

vector< int > keep;
vector<int> keep;
NMSBoxesBatched(boxesXYXY, maxScores, maxScoreIdx, this->confThreshold, this->nmsThreshold, keep);
Mat candidates(int(keep.size()), 6, CV_32FC1);
int row = 0;
Expand Down Expand Up @@ -282,7 +282,7 @@ int main(int argc, char** argv)
else
cap.open(0);
if (!cap.isOpened())
CV_Error(Error::StsError, "Cannot opend video or file");
CV_Error(Error::StsError, "Cannot open video or file");
Mat frame, inputBlob;
double letterboxScale;

Expand Down
2 changes: 1 addition & 1 deletion models/object_detection_yolox/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def vis(dets, srcimg, letterbox_scale, fps=None):
img = vis(preds, image, letterbox_scale)

if args.save:
print('Resutls saved to result.jpg\n')
print('Results saved to result.jpg\n')
cv.imwrite('result.jpg', img)

if args.vis:
Expand Down
3 changes: 1 addition & 2 deletions models/person_detection_mediapipe/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,9 @@ int main(int argc, char** argv)
backendTargetPairs[backendTargetid].first, backendTargetPairs[backendTargetid].second);
//! [Open a video file or an image file or a camera stream]
if (!cap.isOpened())
CV_Error(Error::StsError, "Cannot opend video or file");
CV_Error(Error::StsError, "Cannot video or file");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! Also updated several more typos.


static const std::string kWinName = "MPPersonDet Demo";
int nbInference = 0;
while (waitKey(1) < 0)
{
cap >> frame;
Expand Down
4 changes: 2 additions & 2 deletions models/pose_estimation_mediapipe/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class MPPersonDet {
{
rotBoxes[i] = Rect2d(Point2d(boxes.at<float>(i, 0), boxes.at<float>(i, 1)), Point2d(boxes.at<float>(i, 2), boxes.at<float>(i, 3)));
}
vector< int > keep;
vector<int> keep;
NMSBoxes(rotBoxes, score, this->scoreThreshold, this->nmsThreshold, keep, 1.0f, this->topK);
if (keep.size() == 0)
return Mat();
Expand Down Expand Up @@ -567,7 +567,7 @@ int main(int argc, char** argv)
MPPose poseEstimator(model, confThreshold, backendTargetPairs[backendTargetid].first, backendTargetPairs[backendTargetid].second);
//! [Open a video file or an image file or a camera stream]
if (!cap.isOpened())
CV_Error(Error::StsError, "Cannot opend video or file");
CV_Error(Error::StsError, "Cannot open video or file");

static const std::string kWinName = "MPPose Demo";
while (waitKey(1) < 0)
Expand Down
2 changes: 1 addition & 1 deletion models/text_recognition_crnn/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def visualize(image, boxes, texts, color=(0, 255, 0), isClosed=True, thickness=2

# Save results if save is true
if args.save:
print('Resutls saved to result.jpg\n')
print('Results saved to result.jpg\n')
cv.imwrite('result.jpg', original_image)

# Visualize results in a new window
Expand Down