Update app.py
Browse files
app.py
CHANGED
@@ -31,10 +31,10 @@ async def analyze_path(file: UploadFile = File(...)):
|
|
31 |
# 🔵 Resize ảnh để xử lý nhanh hơn
|
32 |
image = image.resize((256, 256))
|
33 |
image_np = np.array(image)
|
34 |
-
|
35 |
|
36 |
# 🟢 Chuẩn bị ảnh cho mô hình
|
37 |
-
inputs = processor(images=
|
38 |
|
39 |
# 🟢 Dự đoán Depth Map với model mới
|
40 |
with torch.no_grad():
|
|
|
31 |
# 🔵 Resize ảnh để xử lý nhanh hơn
|
32 |
image = image.resize((256, 256))
|
33 |
image_np = np.array(image)
|
34 |
+
// flipped_image = cv2.flip(image_np, -1) # Lật ảnh
|
35 |
|
36 |
# 🟢 Chuẩn bị ảnh cho mô hình
|
37 |
+
inputs = processor(images=image_np, return_tensors="pt").to(device)
|
38 |
|
39 |
# 🟢 Dự đoán Depth Map với model mới
|
40 |
with torch.no_grad():
|