Skip to content

Commit ce3e488

Browse files
committed
fix: rm duplicate color cvt
1 parent 8b23e81 commit ce3e488

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

demo_onnx.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from rapid_table_det.inference import TableDetector
22

3-
img_path = f"images/WechatIMG149.jpeg"
3+
img_path = f"images/0c35d6430193babb29c6a94711742531-1_rot2_noise.jpg"
44
table_det = TableDetector(
55
edge_model_type="yolo_edge_det", obj_model_type="yolo_obj_det"
66
)
@@ -16,7 +16,6 @@
1616
from rapid_table_det.utils.visuallize import img_loader, visuallize, extract_table_img
1717

1818
img = img_loader(img_path)
19-
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
2019
file_name_with_ext = os.path.basename(img_path)
2120
file_name, file_ext = os.path.splitext(file_name_with_ext)
2221
out_dir = "rapid_table_det/outputs"

rapid_table_det/utils/load_image.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ def __call__(self, img: InputType) -> np.ndarray:
2525

2626
origin_img_type = type(img)
2727
img = self.load_img(img)
28-
if img.ndim == 3:
29-
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
3028
img = self.convert_img(img, origin_img_type)
3129
return img
3230

0 commit comments

Comments
 (0)