Skip to content

Commit

Permalink
Update check_requirements() ROOT (ultralytics#11557)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored May 20, 2023
1 parent ec2b853 commit eef637c
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion classify/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def parse_opt():


def main(opt):
check_requirements(exclude=('tensorboard', 'thop'))
check_requirements(ROOT / 'requirements.txt', exclude=('tensorboard', 'thop'))
run(**vars(opt))


Expand Down
2 changes: 1 addition & 1 deletion classify/val.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def parse_opt():


def main(opt):
check_requirements(exclude=('tensorboard', 'thop'))
check_requirements(ROOT / 'requirements.txt', exclude=('tensorboard', 'thop'))
run(**vars(opt))


Expand Down
2 changes: 1 addition & 1 deletion data/Objects365.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ download: |
from utils.general import Path, check_requirements, download, np, xyxy2xywhn
check_requirements(('pycocotools>=2.0',))
check_requirements('pycocotools>=2.0')
from pycocotools.coco import COCO
# Make Directories
Expand Down
2 changes: 1 addition & 1 deletion detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def parse_opt():


def main(opt):
check_requirements(exclude=('tensorboard', 'thop'))
check_requirements(ROOT / 'requirements.txt', exclude=('tensorboard', 'thop'))
run(**vars(opt))


Expand Down
4 changes: 2 additions & 2 deletions hubconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ def _create(name, pretrained=True, channels=3, classes=80, autoshape=True, verbo
from models.experimental import attempt_load
from models.yolo import ClassificationModel, DetectionModel, SegmentationModel
from utils.downloads import attempt_download
from utils.general import LOGGER, check_requirements, intersect_dicts, logging
from utils.general import LOGGER, ROOT, check_requirements, intersect_dicts, logging
from utils.torch_utils import select_device

if not verbose:
LOGGER.setLevel(logging.WARNING)
check_requirements(exclude=('opencv-python', 'tensorboard', 'thop'))
check_requirements(ROOT / 'requirements.txt', exclude=('opencv-python', 'tensorboard', 'thop'))
name = Path(name)
path = name.with_suffix('.pt') if name.suffix == '' and not name.is_dir() else name # checkpoint path
try:
Expand Down
2 changes: 1 addition & 1 deletion segment/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def parse_opt():


def main(opt):
check_requirements(exclude=('tensorboard', 'thop'))
check_requirements(ROOT / 'requirements.txt', exclude=('tensorboard', 'thop'))
run(**vars(opt))


Expand Down
2 changes: 1 addition & 1 deletion segment/val.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def parse_opt():


def main(opt):
check_requirements(requirements=ROOT / 'requirements.txt', exclude=('tensorboard', 'thop'))
check_requirements(ROOT / 'requirements.txt', exclude=('tensorboard', 'thop'))

if opt.task in ('train', 'val', 'test'): # run normally
if opt.conf_thres > 0.001: # https://github.com/ultralytics/yolov5/issues/1466
Expand Down
2 changes: 1 addition & 1 deletion val.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def parse_opt():


def main(opt):
check_requirements(exclude=('tensorboard', 'thop'))
check_requirements(ROOT / 'requirements.txt', exclude=('tensorboard', 'thop'))

if opt.task in ('train', 'val', 'test'): # run normally
if opt.conf_thres > 0.001: # https://github.com/ultralytics/yolov5/issues/1466
Expand Down

0 comments on commit eef637c

Please sign in to comment.