Update app.py
Browse files
app.py
CHANGED
@@ -26,10 +26,10 @@ def process_depth_map(image_pil):
|
|
26 |
# 🔵 Resize ảnh để tăng tốc độ xử lý
|
27 |
image = image_pil.resize((256, 256))
|
28 |
image_np = np.array(image)
|
29 |
-
|
30 |
|
31 |
# 🟢 Chuẩn bị ảnh cho mô hình
|
32 |
-
inputs = feature_extractor(images=
|
33 |
|
34 |
# 🟢 Dự đoán Depth Map với DPT-Swinv2 Tiny
|
35 |
with torch.no_grad():
|
|
|
26 |
# 🔵 Resize ảnh để tăng tốc độ xử lý
|
27 |
image = image_pil.resize((256, 256))
|
28 |
image_np = np.array(image)
|
29 |
+
// flipped_image = cv2.flip(image_np, -1)
|
30 |
|
31 |
# 🟢 Chuẩn bị ảnh cho mô hình
|
32 |
+
inputs = feature_extractor(images=image_np, return_tensors="pt").to(device)
|
33 |
|
34 |
# 🟢 Dự đoán Depth Map với DPT-Swinv2 Tiny
|
35 |
with torch.no_grad():
|