From 9c634e97556a0db57466933506956943a585b874 Mon Sep 17 00:00:00 2001 From: fatih <34196005+fcakyon@users.noreply.github.com> Date: Tue, 2 Nov 2021 14:01:08 +0300 Subject: [PATCH] fix a bug in `export_coco_as_yolov5` (#262) * fix a bug in `export_coco_as_yolov5` * update to v0.8.8 --- sahi/__init__.py | 2 +- sahi/utils/coco.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sahi/__init__.py b/sahi/__init__.py index 686e10f8..aa00ec3d 100644 --- a/sahi/__init__.py +++ b/sahi/__init__.py @@ -1 +1 @@ -__version__ = "0.8.7" +__version__ = "0.8.8" diff --git a/sahi/utils/coco.py b/sahi/utils/coco.py index 7afe7579..a4039f1a 100644 --- a/sahi/utils/coco.py +++ b/sahi/utils/coco.py @@ -2230,9 +2230,7 @@ def export_coco_as_yolov5( ValueError("'train_coco' have to be provided") # check train_split_rate - if 0 < train_split_rate and train_split_rate < 1: - split_mode = "SPLIT" - else: + if split_mode and not (0 < train_split_rate < 1): ValueError("train_split_rate cannot be <0 or >1") # split dataset