Upload inference.py with huggingface_hub
Browse files- inference.py +2 -2
inference.py
CHANGED
|
@@ -75,8 +75,8 @@ progress = tqdm(total=len(image_paths), desc="Processing images", unit="image")
|
|
| 75 |
for img_path in image_paths:
|
| 76 |
img = cv2.imread(img_path)
|
| 77 |
height, width = img.shape[:2]
|
| 78 |
-
card = np.ones((height+
|
| 79 |
-
card[
|
| 80 |
cv2.imwrite(f"debug/{os.path.basename(img_path)}", card)
|
| 81 |
if img is None and verbose>=1:
|
| 82 |
print(f"Could not read image: {img_path}")
|
|
|
|
| 75 |
for img_path in image_paths:
|
| 76 |
img = cv2.imread(img_path)
|
| 77 |
height, width = img.shape[:2]
|
| 78 |
+
card = np.ones((height+10, width+10, 3), dtype=np.uint8) * 255
|
| 79 |
+
card[5:5+height, 5:5+width] = img
|
| 80 |
cv2.imwrite(f"debug/{os.path.basename(img_path)}", card)
|
| 81 |
if img is None and verbose>=1:
|
| 82 |
print(f"Could not read image: {img_path}")
|