Update app.py
Browse files
app.py
CHANGED
@@ -27,11 +27,11 @@ class EnumModel(str, Enum):
|
|
27 |
default = "default"
|
28 |
|
29 |
class YOLODetector:
|
30 |
-
def __init__(self, api_url: str, stride: int =
|
31 |
self.api_url = api_url
|
32 |
self.stride = stride
|
33 |
|
34 |
-
def preprocess_image(self, image_path: str, target_size: Tuple[int, int] = (
|
35 |
img = cv2.imread(image_path)
|
36 |
img_size = self.check_img_size(target_size, s=self.stride)
|
37 |
img_resized = cv2.resize(img, img_size)
|
|
|
27 |
default = "default"
|
28 |
|
29 |
class YOLODetector:
|
30 |
+
def __init__(self, api_url: str, stride: int = 3):
|
31 |
self.api_url = api_url
|
32 |
self.stride = stride
|
33 |
|
34 |
+
def preprocess_image(self, image_path: str, target_size: Tuple[int, int] = (1280, 1280)) -> str:
|
35 |
img = cv2.imread(image_path)
|
36 |
img_size = self.check_img_size(target_size, s=self.stride)
|
37 |
img_resized = cv2.resize(img, img_size)
|