Qbsoon commited on
Commit
631a25c
·
verified ·
1 Parent(s): f3bf0cf

Upload inference.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. 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+50, width+50, 3), dtype=np.uint8) * 255
79
- card[50:50+height, 50:50+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}")
 
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}")