From 58203e49c8662b8d8bb1889f0c0eab55d8c47646 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 17 Jun 2019 18:02:04 +0200 Subject: [PATCH] updates --- utils/utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/utils.py b/utils/utils.py index fff6d03f..3b8f30cc 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -11,6 +11,7 @@ from PIL import Image from tqdm import tqdm from . import torch_utils +from . import parse_config matplotlib.rc('font', **{'size': 12}) @@ -489,6 +490,14 @@ def strip_optimizer_from_checkpoint(filename='weights/best.pt'): torch.save(a, filename.replace('.pt', '_lite.pt')) +def extract_bounding_boxes(data_cfg='data/coco_64img.data'): # from utils.utils import *; extract_bounding_boxes() + # Extract bounding boxes into a new classification dataset + data_dict = parse_config.parse_data_cfg(data_cfg) + train_path = data_dict['train'] + nc = int(data_dict['classes']) # number of classes + + + def coco_class_count(path='../coco/labels/train2014/'): # Histogram of occurrences per class nc = 80 # number classes