Skip to content

Commit

Permalink
fix: rm duplicate color cvt
Browse files Browse the repository at this point in the history
  • Loading branch information
Joker1212 committed Dec 10, 2024
1 parent 8b23e81 commit ce3e488
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 1 addition & 2 deletions demo_onnx.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from rapid_table_det.inference import TableDetector

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

img = img_loader(img_path)
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
file_name_with_ext = os.path.basename(img_path)
file_name, file_ext = os.path.splitext(file_name_with_ext)
out_dir = "rapid_table_det/outputs"
Expand Down
2 changes: 0 additions & 2 deletions rapid_table_det/utils/load_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ def __call__(self, img: InputType) -> np.ndarray:

origin_img_type = type(img)
img = self.load_img(img)
if img.ndim == 3:
img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
img = self.convert_img(img, origin_img_type)
return img

Expand Down

0 comments on commit ce3e488

Please sign in to comment.