This commit is contained in:
Glenn Jocher 2020-01-15 10:22:59 -08:00
parent 5831d2d6ba
commit 53e3d55a1e
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ if __name__ == '__main__':
parser.add_argument('--half', action='store_true', help='half precision FP16 inference') parser.add_argument('--half', action='store_true', help='half precision FP16 inference')
parser.add_argument('--device', default='', help='device id (i.e. 0 or 0,1) or cpu') parser.add_argument('--device', default='', help='device id (i.e. 0 or 0,1) or cpu')
parser.add_argument('--view-img', action='store_true', help='display results') parser.add_argument('--view-img', action='store_true', help='display results')
parser.add_argument('--save-txt', action='store_true', help='display results') parser.add_argument('--save-txt', action='store_true', help='save results to *.txt')
parser.add_argument('--classes', nargs='+', type=int, help='filter by class') parser.add_argument('--classes', nargs='+', type=int, help='filter by class')
parser.add_argument('--agnostic-nms', action='store_true', help='class-agnostic NMS') parser.add_argument('--agnostic-nms', action='store_true', help='class-agnostic NMS')
opt = parser.parse_args() opt = parser.parse_args()

View File

@ -830,7 +830,7 @@ def print_mutation(hyp, results, bucket=''):
def apply_classifier(x, model, img, im0): def apply_classifier(x, model, img, im0):
# applies a second stage classifier to yolo outputs # applies a second stage classifier to yolo outputs
im0 = [im0] if isinstance(im0, np.ndarray) else im0
for i, d in enumerate(x): # per image for i, d in enumerate(x): # per image
if d is not None and len(d): if d is not None and len(d):
d = d.clone() d = d.clone()