This commit is contained in:
Glenn Jocher 2019-07-30 15:23:31 +02:00
parent 62d4a74052
commit 8a74a683ae
2 changed files with 10 additions and 7 deletions

View File

@ -79,18 +79,19 @@ HS**V** Intensity | +/- 50%
https://cloud.google.com/deep-learning-vm/ https://cloud.google.com/deep-learning-vm/
**Machine type:** n1-standard-8 (8 vCPUs, 30 GB memory) **Machine type:** n1-standard-8 (8 vCPUs, 30 GB memory)
**CPU platform:** Intel Skylake **CPU platform:** Intel Skylake
**GPUs:** K80 ($0.20/hr), T4 ($0.35/hr), V100 ($0.80/hr) CUDA with Nvidia Apex FP16/32 **GPUs:** K80 ($0.20/hr), T4 ($0.35/hr), V100 ($0.80/hr) CUDA with [Nvidia Apex](https://github.com/NVIDIA/apex) FP16/32
**HDD:** 100 GB SSD **HDD:** 100 GB SSD
**Dataset:** COCO train 2014 (117,263 images) **Dataset:** COCO train 2014 (117,263 images)
GPUs | `batch_size` | batch time | epoch time | epoch cost GPUs | `batch_size` | batch time | epoch time | epoch cost
--- |---| --- | --- | --- --- |---| --- | --- | ---
1 K80 | 64 (32x2) | 2.9s | 175min | $0.58 K80 | 64 (32x2) | 2.90 s | 175 min | $0.58
1 T4 | 64 (32x2) | 0.80s | 49min | $0.29 T4 | 64 (32x2) | 0.80 s | 49 min | $0.29
2 T4 | 64 (64x1) | 0.52s | 32min | $0.36 T4 x2 | 64 (64x1) | 0.52 s | 32 min | $0.36
1 2080ti | 64 (32x2) | - | - | - V100 | 64 (32x2) | 0.38 s | 23 min | $0.31
1 V100 | 64 (32x2) | 0.38s | 23min | $0.31 V100 x2 | 64 (64x1) | 0.30 s | 18 min | $0.46
2 V100 | 64 (64x1) | 0.30s | 18min | $0.46 2080Ti | 64 (32x2) | 0.46 s | 28 min | -
# Inference # Inference

View File

@ -40,6 +40,7 @@ def exif_size(img):
class LoadImages: # for inference class LoadImages: # for inference
def __init__(self, path, img_size=416): def __init__(self, path, img_size=416):
path = str(Path(path)) # os-agnostic
files = [] files = []
if os.path.isdir(path): if os.path.isdir(path):
files = sorted(glob.glob(os.path.join(path, '*.*'))) files = sorted(glob.glob(os.path.join(path, '*.*')))
@ -154,6 +155,7 @@ class LoadWebcam: # for inference
class LoadImagesAndLabels(Dataset): # for training/testing class LoadImagesAndLabels(Dataset): # for training/testing
def __init__(self, path, img_size=416, batch_size=16, augment=False, hyp=None, rect=False, image_weights=False): def __init__(self, path, img_size=416, batch_size=16, augment=False, hyp=None, rect=False, image_weights=False):
path = str(Path(path)) # os-agnostic
with open(path, 'r') as f: with open(path, 'r') as f:
self.img_files = [x for x in f.read().splitlines() if os.path.splitext(x)[-1].lower() in img_formats] self.img_files = [x for x in f.read().splitlines() if os.path.splitext(x)[-1].lower() in img_formats]