This commit is contained in:
Glenn Jocher 2018-08-26 20:24:37 +02:00
parent 56badeef8a
commit 6da62e433d
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ num_classes = int(data_config['classes'])
model = Darknet(opt.cfg, opt.img_size) model = Darknet(opt.cfg, opt.img_size)
# Load weights # Load weights
weights_path = 'checkpoints/yolov3.pt' weights_path = 'checkpoints/yolov3.weights'
if weights_path.endswith('.weights'): # darknet format if weights_path.endswith('.weights'): # darknet format
load_weights(model, weights_path) load_weights(model, weights_path)
elif weights_path.endswith('.pt'): # pytorch format elif weights_path.endswith('.pt'): # pytorch format

View File

@ -68,7 +68,7 @@ class ListDataset(): # for training
if platform == 'darwin': # macos if platform == 'darwin': # macos
self.img_files = [path.replace('\n', '').replace('/images', '/Users/glennjocher/Downloads/DATA/coco/images') self.img_files = [path.replace('\n', '').replace('/images', '/Users/glennjocher/Downloads/DATA/coco/images')
for path in self.img_files] for path in self.img_files]
else: else: # linux (gcp cloud)
self.img_files = [path.replace('\n', '').replace('/images', '../coco/images') for path in self.img_files] self.img_files = [path.replace('\n', '').replace('/images', '../coco/images') for path in self.img_files]
self.label_files = [path.replace('images', 'labels').replace('.png', '.txt').replace('.jpg', '.txt') for path in self.label_files = [path.replace('images', 'labels').replace('.png', '.txt').replace('.jpg', '.txt') for path in