Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions models/object_tracking_vittrack/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from vittrack import VitTrack

# Check OpenCV version
assert cv.__version__ > "4.9.0", \
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"

# Valid combinations of backends and targets
Expand Down Expand Up @@ -52,7 +52,7 @@ def visualize(image, bbox, score, isLocated, fps=None, box_color=(0, 255, 0),tex
# bbox: Tuple of length 4
x, y, w, h = bbox
cv.rectangle(output, (x, y), (x+w, y+h), box_color, 2)
cv.putText(output, '{:.2f}'.format(score), (x, y+20), cv.FONT_HERSHEY_DUPLEX, fontScale, text_color, fontSize)
cv.putText(output, '{:.2f}'.format(score), (x, y+25), cv.FONT_HERSHEY_DUPLEX, fontScale, text_color, fontSize)
else:
text_size, baseline = cv.getTextSize('Target lost!', cv.FONT_HERSHEY_DUPLEX, fontScale, fontSize)
text_x = int((w - text_size[0]) / 2)
Expand Down
2 changes: 1 addition & 1 deletion models/optical_flow_estimation_raft/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from raft import Raft

# Check OpenCV version
assert cv.__version__ > "4.9.0", \
assert cv.__version__ >= "4.9.0", \
"Please install latest opencv-python to try this demo: python3 -m pip install --upgrade opencv-python"

parser = argparse.ArgumentParser(description='RAFT (https://github.com/princeton-vl/RAFT)')
Expand Down