Skip to content

这个框架支持数据集中存在负样本吗 #39

@wangyf0928

Description

@wangyf0928

我的数据集中有的图片没有目标框,xml中也没有object,运行到voc.py中的color_print会报错:
Traceback (most recent call last):
File "train.py", line 19, in
from dataloader.dataloaders import train_dataloader, val_dataloader
File "D:\easy_detection\easy_detection\dataloader\dataloaders.py", line 25, in
train_dataset, val_dataset = get_all_datasets()
File "D:\easy_detection\easy_detection\dataloader\list_dataset.py", line 82, in get_all_datasets
first_gpu=is_first_gpu())
File "D:\easy_detection\easy_detection\dataloader\voc.py", line 160, in init
utils.color_print(f'{name}: {counter[name]} ({counter[name]/tot_bbox*100:.2f}%)', 5)
ZeroDivisionError: division by zero

注释掉这里的代码之后可以运行,但是输出结果全是nan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions