Skip to content

Commit

Permalink
Update pycocotools>=2.0.6 (ultralytics#10605)
Browse files Browse the repository at this point in the history
* Update `pycocotools>=2.0.6`

Signed-off-by: Glenn Jocher <[email protected]>

* Update val.py

Signed-off-by: Glenn Jocher <[email protected]>

* Update val.py

Signed-off-by: Glenn Jocher <[email protected]>

* Update Dockerfile

Signed-off-by: Glenn Jocher <[email protected]>

Signed-off-by: Glenn Jocher <[email protected]>
  • Loading branch information
glenn-jocher authored Dec 27, 2022
1 parent b1e9976 commit 8ca1826
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion segment/val.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions utils/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion val.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8ca1826

Please sign in to comment.