updates
This commit is contained in:
parent
184db1fb10
commit
b965b6e9b7
|
@ -2,6 +2,7 @@ import glob
|
||||||
import math
|
import math
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
|
from sys import platform
|
||||||
|
|
||||||
import cv2
|
import cv2
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
@ -63,7 +64,11 @@ class ListDataset(): # for training
|
||||||
#self.img_files = sorted(glob.glob('%s/*.*' % path))
|
#self.img_files = sorted(glob.glob('%s/*.*' % path))
|
||||||
with open(path, 'r') as file:
|
with open(path, 'r') as file:
|
||||||
self.img_files = file.readlines()
|
self.img_files = file.readlines()
|
||||||
self.img_files = [path.replace('\n', '').replace('/images','/Users/glennjocher/Downloads/DATA/coco/images') for path in self.img_files]
|
|
||||||
|
if platform == 'darwin': # macos
|
||||||
|
self.img_files = [path.replace('\n', '').replace('/images','/Users/glennjocher/Downloads/DATA/coco/images') for path in self.img_files]
|
||||||
|
else:
|
||||||
|
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
|
||||||
self.img_files]
|
self.img_files]
|
||||||
|
|
Loading…
Reference in New Issue