model.names multi-GPU bug fix #94

This commit is contained in:
Glenn Jocher committed 2020-06-24 22:22:13 -07:00
1 parent 9a9c4f1259
commit b50fdf16af
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ def detect(save_img=False):
dataset = LoadImages(source, img_size=imgsz)
# Get names and colors
names = model.names if hasattr(model, 'names') else model.modules.names
names = model.module.names if hasattr(model, 'module') else model.names
colors = [[random.randint(0, 255) for _ in range(3)] for _ in range(len(names))]
# Run inference