Spaces:
Sleeping
Sleeping
Update tasks/image.py
Browse files- tasks/image.py +2 -2
tasks/image.py
CHANGED
|
@@ -37,7 +37,7 @@ print("CUDA version:", torch.version.cuda)
|
|
| 37 |
print("cuDNN version:", torch.backends.cudnn.version())
|
| 38 |
|
| 39 |
#MODEL_TYPE = "YOLOv11n"
|
| 40 |
-
DESCRIPTION = f"YOLOv8n model with batch
|
| 41 |
print(14)
|
| 42 |
ROUTE = "/image"
|
| 43 |
print(15)
|
|
@@ -145,7 +145,7 @@ async def evaluate_image(request: ImageEvaluationRequest):
|
|
| 145 |
INFERENCE_ENGINE_TYPE = 'pt'
|
| 146 |
INPUT_SIZE = 640
|
| 147 |
N_TEST_BATCHES = 2
|
| 148 |
-
BATCH_SIZE =
|
| 149 |
print("PATH_TO_MODEL", PATH_TO_MODEL)
|
| 150 |
def preprocessor(frame):
|
| 151 |
#frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) # Only when read from file
|
|
|
|
| 37 |
print("cuDNN version:", torch.backends.cudnn.version())
|
| 38 |
|
| 39 |
#MODEL_TYPE = "YOLOv11n"
|
| 40 |
+
DESCRIPTION = f"YOLOv8n model with batch 64 inference on TensorRT"
|
| 41 |
print(14)
|
| 42 |
ROUTE = "/image"
|
| 43 |
print(15)
|
|
|
|
| 145 |
INFERENCE_ENGINE_TYPE = 'pt'
|
| 146 |
INPUT_SIZE = 640
|
| 147 |
N_TEST_BATCHES = 2
|
| 148 |
+
BATCH_SIZE = 64 # Can be adjusted as needed
|
| 149 |
print("PATH_TO_MODEL", PATH_TO_MODEL)
|
| 150 |
def preprocessor(frame):
|
| 151 |
#frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) # Only when read from file
|