Skip to content

Commit

Permalink
fix: add type ignore for cv2.VideoWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
sokovninn committed Oct 1, 2024
1 parent 95af2bd commit 8f763f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions luxonis_train/core/utils/infer_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def process_video(
show: bool = False,
) -> None:
"""Handles inference on a video."""
cap = cv2.VideoCapture(filename=str(video_path))
cap = cv2.VideoCapture(filename=str(video_path)) # type: ignore
total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
progress_bar = tqdm.tqdm(
total=total_frames, position=0, leave=True, desc="Processing video"
Expand Down Expand Up @@ -121,7 +121,7 @@ def process_video(
fourcc=cv2.VideoWriter_fourcc(*"mp4v"),

Check failure on line 121 in luxonis_train/core/utils/infer_utils.py

View workflow job for this annotation

GitHub Actions / type-check

No parameter named "fourcc" (reportCallIssue)
fps=cap.get(cv2.CAP_PROP_FPS),

Check failure on line 122 in luxonis_train/core/utils/infer_utils.py

View workflow job for this annotation

GitHub Actions / type-check

No parameter named "fps" (reportCallIssue)
frameSize=(viz_arrs[0].shape[1], viz_arrs[0].shape[0]),

Check failure on line 123 in luxonis_train/core/utils/infer_utils.py

View workflow job for this annotation

GitHub Actions / type-check

No parameter named "frameSize" (reportCallIssue)
)
) # type: ignore
for viz_arr in viz_arrs:
out_writers[name].write(viz_arr)

Expand Down

0 comments on commit 8f763f3

Please sign in to comment.