From 8ca182613499c323a411f559b7b5ea072122c897 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 27 Dec 2022 15:41:03 +0100 Subject: [PATCH] Update `pycocotools>=2.0.6` (#10605) * Update `pycocotools>=2.0.6` Signed-off-by: Glenn Jocher * Update val.py Signed-off-by: Glenn Jocher * Update val.py Signed-off-by: Glenn Jocher * Update Dockerfile Signed-off-by: Glenn Jocher Signed-off-by: Glenn Jocher --- requirements.txt | 2 +- segment/val.py | 2 +- utils/docker/Dockerfile | 4 ++-- val.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 4a8649c..c6bd0f2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -44,6 +44,6 @@ seaborn>=0.11.0 # Extras ---------------------------------------------------------------------- # mss # screenshots # albumentations>=1.0.3 -# pycocotools>=2.0 # COCO mAP +# pycocotools>=2.0.6 # COCO mAP # roboflow # ultralytics # HUB https://hub.ultralytics.com diff --git a/segment/val.py b/segment/val.py index 5cf8ae8..248d2be 100644 --- a/segment/val.py +++ b/segment/val.py @@ -159,7 +159,7 @@ def run( callbacks=Callbacks(), ): if save_json: - check_requirements(['pycocotools']) + check_requirements('pycocotools>=2.0.6') process = process_mask_native # more accurate else: process = process_mask # faster diff --git a/utils/docker/Dockerfile b/utils/docker/Dockerfile index abc3da0..6f9de52 100644 --- a/utils/docker/Dockerfile +++ b/utils/docker/Dockerfile @@ -16,8 +16,8 @@ RUN apt update && apt install --no-install-recommends -y zip htop screen libgl1- COPY requirements.txt . RUN python -m pip install --upgrade pip wheel RUN pip uninstall -y Pillow torchtext torch torchvision -RUN pip install --no-cache -r requirements.txt ultralytics albumentations comet gsutil notebook Pillow>=9.1.0 \ - 'opencv-python<4.6.0.66' \ +RUN pip install --no-cache -r requirements.txt albumentations comet gsutil notebook 'opencv-python<4.6.0.66' \ + Pillow>=9.1.0 pycocotools>=2.0.6 ultralytics \ --extra-index-url https://download.pytorch.org/whl/cu113 # Create working directory diff --git a/val.py b/val.py index 8d27d9d..599aa1a 100644 --- a/val.py +++ b/val.py @@ -309,7 +309,7 @@ def run( json.dump(jdict, f) try: # https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocoEvalDemo.ipynb - check_requirements('pycocotools') + check_requirements('pycocotools>=2.0.6') from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval