updates
This commit is contained in:
parent
55bb905072
commit
58203e49c8
|
@ -11,6 +11,7 @@ from PIL import Image
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
from . import torch_utils
|
from . import torch_utils
|
||||||
|
from . import parse_config
|
||||||
|
|
||||||
matplotlib.rc('font', **{'size': 12})
|
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'))
|
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/'):
|
def coco_class_count(path='../coco/labels/train2014/'):
|
||||||
# Histogram of occurrences per class
|
# Histogram of occurrences per class
|
||||||
nc = 80 # number classes
|
nc = 80 # number classes
|
||||||
|
|
Loading…
Reference in New Issue