Spaces:
Sleeping
Sleeping
Update test.py
Browse files
test.py
CHANGED
|
@@ -42,7 +42,7 @@ def detectar_escala(img_bgr):
|
|
| 42 |
length = abs(x2 - x1)
|
| 43 |
if length > longest:
|
| 44 |
longest = length
|
| 45 |
-
return
|
| 46 |
|
| 47 |
def processar_uma_imagem(imagem_path, dispositivo, conf_min, pixels_minimos):
|
| 48 |
device = "cuda" if dispositivo == "GPU" and torch.cuda.is_available() else "cpu"
|
|
|
|
| 42 |
length = abs(x2 - x1)
|
| 43 |
if length > longest:
|
| 44 |
longest = length
|
| 45 |
+
return 1.0 / longest if longest > 0 else None
|
| 46 |
|
| 47 |
def processar_uma_imagem(imagem_path, dispositivo, conf_min, pixels_minimos):
|
| 48 |
device = "cuda" if dispositivo == "GPU" and torch.cuda.is_available() else "cpu"
|