Added if clause to check for empty instance
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
parent
eef8839657
commit
aaaea5f942
|
@ -93,6 +93,8 @@ def save_ssd_train_images(images: Union[np.ndarray, Sequence[str]], labels: np.n
|
||||||
ymin = instance[3]
|
ymin = instance[3]
|
||||||
xmax = instance[4]
|
xmax = instance[4]
|
||||||
ymax = instance[5]
|
ymax = instance[5]
|
||||||
|
elif not len(instance):
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
instance = np.copy(instance)
|
instance = np.copy(instance)
|
||||||
class_id = np.argmax(instance[:-12], axis=0)
|
class_id = np.argmax(instance[:-12], axis=0)
|
||||||
|
|
Loading…
Reference in New Issue