Update app.py
Browse files
app.py
CHANGED
|
@@ -56,7 +56,7 @@ def predict_keypoints(image):
|
|
| 56 |
# Convert PIL → CV2 → tensor
|
| 57 |
img = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR) / 255.0
|
| 58 |
img_resized = cv2.resize(img, (224,224))
|
| 59 |
-
input_tensor = transform(img_resized).unsqueeze(0).to(device)
|
| 60 |
|
| 61 |
with torch.no_grad():
|
| 62 |
pred = model(input_tensor)
|
|
|
|
| 56 |
# Convert PIL → CV2 → tensor
|
| 57 |
img = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR) / 255.0
|
| 58 |
img_resized = cv2.resize(img, (224,224))
|
| 59 |
+
input_tensor = transform(img_resized).unsqueeze(0).float().to(device)
|
| 60 |
|
| 61 |
with torch.no_grad():
|
| 62 |
pred = model(input_tensor)
|