diff --git a/examples/YOLOv8-Action-Recognition/action_recognition.py b/examples/YOLOv8-Action-Recognition/action_recognition.py index d5fa6da721..40a237f339 100644 --- a/examples/YOLOv8-Action-Recognition/action_recognition.py +++ b/examples/YOLOv8-Action-Recognition/action_recognition.py @@ -212,7 +212,9 @@ class HuggingFaceVideoClassifier: [ v2.ToDtype(torch.float32, scale=True), v2.Resize(input_size, antialias=True), - v2.Normalize(mean=self.processor.image_processor.image_mean, std=self.processor.image_processor.image_std), + v2.Normalize( + mean=self.processor.image_processor.image_mean, std=self.processor.image_processor.image_std + ), ] ) else: diff --git a/ultralytics/solutions/action_recognition.py b/ultralytics/solutions/action_recognition.py index 8db57e32af..b0623ca540 100644 --- a/ultralytics/solutions/action_recognition.py +++ b/ultralytics/solutions/action_recognition.py @@ -207,9 +207,7 @@ class TorchVisionVideoClassifier: supports_r3d = check_requirements("torchvision>=0.8.1", install=False) supports_transforms_v2 = check_requirements("torchvision>=0.16.0", install=False) supports_mvitv1b = supports_s3d = check_requirements("torchvision>=0.14.0", install=False) - supports_mvitv2s = supports_swin3dt = supports_swin3db = check_requirements( - "torchvision>=0.15.0", install=False - ) + supports_mvitv2s = supports_swin3dt = supports_swin3db = check_requirements("torchvision>=0.15.0", install=False) model_name_to_model_and_weights = {} if supports_r3d: @@ -396,7 +394,9 @@ class HuggingFaceVideoClassifier: [ v2.ToDtype(torch.float32, scale=True), v2.Resize(input_size, antialias=True), - v2.Normalize(mean=self.processor.image_processor.image_mean, std=self.processor.image_processor.image_std), + v2.Normalize( + mean=self.processor.image_processor.image_mean, std=self.processor.image_processor.image_std + ), ] ) else: