Add check_requirements() (#1853)

* Add check_requirements()

* add import

* parameterize filename

* add to detect, test
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-01-06 16:35:40 -08:00
1 parent 135ec5c5ce
commit e77c77f580
4 files changed
+16 -5

No files matched your search

+3 -2
View File
@@ -11,8 +11,8 @@ from tqdm import tqdm
from models.experimental import attempt_load
from utils.datasets import create_dataloader
from utils.general import coco80_to_coco91_class, check_dataset, check_file, check_img_size, box_iou, \
non_max_suppression, scale_coords, xyxy2xywh, xywh2xyxy, set_logging, increment_path
from utils.general import coco80_to_coco91_class, check_dataset, check_file, check_img_size, check_requirements, \
box_iou, non_max_suppression, scale_coords, xyxy2xywh, xywh2xyxy, set_logging, increment_path
from utils.loss import compute_loss
from utils.metrics import ap_per_class, ConfusionMatrix
from utils.plots import plot_images, output_to_target, plot_study_txt
@@ -302,6 +302,7 @@ if __name__ == '__main__':
opt.save_json |= opt.data.endswith('coco.yaml')
opt.data = check_file(opt.data) # check file
print(opt)
check_requirements()
if opt.task in ['val', 'test']: # run normally
test(opt.data,