Chris-hughes10 / Yolov7-training

A clean, modular implementation of the Yolov7 model family, which uses the official pretrained weights, with utilities for training the model on custom (non-COCO) tasks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

if bbox error

GeorgePearse opened this issue · comments

Hey Chris, excellent bit of work, both the blog post and this repo. I'm just borrowing your mixup and mosaic augmentation implementations for the timebeing but I'm a little confused by this line:

For me it was causing this error:

 The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

e.g. Python has no idea what we're checking the truth of when we feed it the bbox list, which I would have thought is the default happy path?

For my use case I've just removed the condition.

Hi, this is probably where the docstring could be improved! The plotting methods require the boxes and class labels as lists rather than tensors or arrays. If you call .tolist() on your array it should work