From d13b70e51a35f5dda31d301413d503f17436aa3b Mon Sep 17 00:00:00 2001 From: koap <37614244+KoapT@users.noreply.github.com> Date: Thu, 28 Nov 2019 14:07:58 +0800 Subject: [PATCH 1/2] Updata README.md Method to get darknet-yolov3 work in this project. --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4eb8e1049..3a7d1944a 100755 --- a/README.md +++ b/README.md @@ -23,7 +23,12 @@ $ cd .. $ python convert_weight.py $ python freeze_graph.py ``` -4. Then you will get some `.pb` files in the root path., and run the demo script +4. If you want to get darknet-yolov3 [weights](https://pjreddie.com/darknet/yolo/) work in this project,run the following scripts to convert it. +```bashrc +$ python from_darknet_weights_to_ckpt.py # If you just want pb files, skip to the next line. +$ python from_darknet_weights_to_pb.py +``` +5. Then you will get some `.pb` files in the root path., and run the demo script ```bashrc $ python image_demo.py $ python video_demo.py # if use camera, set video_path = 0 From 627bcb0a1eae62f15fca704bb95b172e1e491e58 Mon Sep 17 00:00:00 2001 From: koap <37614244+KoapT@users.noreply.github.com> Date: Wed, 18 Dec 2019 16:12:16 +0800 Subject: [PATCH 2/2] fix the bug --- core/dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/dataset.py b/core/dataset.py index 485e21e79..1df3fbd99 100644 --- a/core/dataset.py +++ b/core/dataset.py @@ -119,8 +119,8 @@ def random_crop(self, image, bboxes): crop_xmin = max(0, int(max_bbox[0] - random.uniform(0, max_l_trans))) crop_ymin = max(0, int(max_bbox[1] - random.uniform(0, max_u_trans))) - crop_xmax = max(w, int(max_bbox[2] + random.uniform(0, max_r_trans))) - crop_ymax = max(h, int(max_bbox[3] + random.uniform(0, max_d_trans))) + crop_xmax = min(w, int(max_bbox[2] + random.uniform(0, max_r_trans))) + crop_ymax = min(h, int(max_bbox[3] + random.uniform(0, max_d_trans))) image = image[crop_ymin : crop_ymax, crop_xmin : crop_xmax]