diff --git a/fastdeploy/vision/detection/contrib/scaled_yolov4.py b/fastdeploy/vision/detection/contrib/scaled_yolov4.py index dad85cde9..29ce6b404 100644 --- a/fastdeploy/vision/detection/contrib/scaled_yolov4.py +++ b/fastdeploy/vision/detection/contrib/scaled_yolov4.py @@ -69,7 +69,7 @@ class ScaledYOLOv4(FastDeployModel): @size.setter def size(self, wh): - assert isinstance(wh, [list, tuple]),\ + assert isinstance(wh, (list, tuple)),\ "The value to set `size` must be type of tuple or list." assert len(wh) == 2,\ "The value to set `size` must contatins 2 elements means [width, height], but now it contains {} elements.".format( diff --git a/fastdeploy/vision/detection/contrib/yolor.py b/fastdeploy/vision/detection/contrib/yolor.py index 6da736aac..44f5128c0 100644 --- a/fastdeploy/vision/detection/contrib/yolor.py +++ b/fastdeploy/vision/detection/contrib/yolor.py @@ -69,7 +69,7 @@ class YOLOR(FastDeployModel): @size.setter def size(self, wh): - assert isinstance(wh, [list, tuple]),\ + assert isinstance(wh, (list, tuple)),\ "The value to set `size` must be type of tuple or list." assert len(wh) == 2,\ "The value to set `size` must contatins 2 elements means [width, height], but now it contains {} elements.".format( diff --git a/fastdeploy/vision/detection/contrib/yolov7.py b/fastdeploy/vision/detection/contrib/yolov7.py index e3437d3b4..a9deb38d3 100644 --- a/fastdeploy/vision/detection/contrib/yolov7.py +++ b/fastdeploy/vision/detection/contrib/yolov7.py @@ -69,7 +69,7 @@ class YOLOv7(FastDeployModel): @size.setter def size(self, wh): - assert isinstance(wh, [list, tuple]),\ + assert isinstance(wh, (list, tuple)),\ "The value to set `size` must be type of tuple or list." assert len(wh) == 2,\ "The value to set `size` must contatins 2 elements means [width, height], but now it contains {} elements.".format(