diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e55bdd0..2f2c38af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.7, 3.8, 3.9, '3.10'] + python-version: [3.8, 3.9, '3.10'] fail-fast: false steps: @@ -90,29 +90,29 @@ jobs: pip install mmcv==2.0.0 -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.13.0/index.html pip install mmdet==3.0.0 - - name: Install YOLOv5(7.0.9) + - name: Install YOLOv5(7.0.13) run: > - pip install yolov5==7.0.9 + pip install yolov5==7.0.13 - name: Install DeepSparse run: > pip install deepsparse - - name: Install Transformers(4.25.1) + - name: Install Transformers(4.35.0) run: > - pip install transformers==4.25.1 + pip install transformers==4.35.0 - - name: Install pycocotools(2.0.6) + - name: Install pycocotools(2.0.7) run: > - pip install pycocotools==2.0.6 + pip install pycocotools==2.0.7 - - name: Install ultralytics + - name: Install ultralytics(8.0.207) run: > - pip install ultralytics==8.0.99 + pip install ultralytics==8.0.207 - - name: Install super-gradients + - name: Install super-gradients(3.3.1) run: > - pip install super-gradients==3.1.2 + pip install super-gradients==3.3.1 - name: Unittest for SAHI+YOLOV5/MMDET/Detectron2 on all platforms run: | diff --git a/.github/workflows/ci_torch1.10.yml b/.github/workflows/ci_torch1.10.yml deleted file mode 100644 index 07ac23dc..00000000 --- a/.github/workflows/ci_torch1.10.yml +++ /dev/null @@ -1,150 +0,0 @@ -name: CI (PyTorch 1.10.2, TorchVision 0.11.3) - -on: - push: - branches: [main] - paths-ignore: - - '**.md' - - '**.ipynb' - - '**.cff' - - pull_request: - branches: [main] - paths-ignore: - - '**.md' - - '**.ipynb' - - '**.cff' - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - operating-system: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.7, 3.8, 3.9] - fail-fast: false - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Restore Ubuntu cache - uses: actions/cache@v3 - if: matrix.operating-system == 'ubuntu-latest' - with: - path: ~/.cache/pip - key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} - restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}- - - - name: Restore MacOS cache - uses: actions/cache@v3 - if: matrix.operating-system == 'macos-latest' - with: - path: ~/Library/Caches/pip - key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} - restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}- - - - name: Restore Windows cache - uses: actions/cache@v3 - if: matrix.operating-system == 'windows-latest' - with: - path: ~\AppData\Local\pip\Cache - key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py')}} - restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}- - - - name: Update pip - run: python -m pip install --upgrade pip - - - name: Lint with flake8, black and isort - run: | - pip install -e .[dev] - # stop the build if there are Python syntax errors or undefined names - python -m scripts.run_code_style check - - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --exit-zero --max-complexity=10 --max-line-length=127 - - - name: Install core dependencies - run: > - pip install -r requirements.txt - - - name: Install PyTorch(1.10.2) and TorchVision(0.11.3) on Linux and Windows - if: > - matrix.operating-system == 'ubuntu-latest' || - matrix.operating-system == 'windows-latest' - run: > - pip install torch==1.10.2+cpu torchvision==0.11.3+cpu - -f https://download.pytorch.org/whl/torch_stable.html - - - name: Install PyTorch(1.10.1) and TorchVision(0.11.2) on MacOS - if: matrix.operating-system == 'macos-latest' - run: pip install torch==1.10.1 torchvision==0.11.2 - - - name: Install MMDetection(3.0.0) with MMCV(2.0.0) - run: > - pip install mmengine==0.7.3 - pip install mmcv==2.0.0 -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.10.0/index.html - pip install mmdet==3.0.0 - - - name: Install YOLOv5(7.0.9) - run: > - pip install yolov5==7.0.9 - - - name: Install DeepSparse - run: > - pip install deepsparse - - - name: Install Detectron2(0.6) - run: > - python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.10/index.html - - - name: Install Transformers(4.25.1) - if: > - matrix.python-version != '3.6' - run: > - pip install transformers==4.25.1 - - - name: Install pycocotools(2.0.6) - run: > - pip install pycocotools==2.0.6 - - - name: Install ultralytics - run: > - pip install ultralytics==8.0.99 - - - name: Install super-gradients - run: > - pip install super-gradients==3.1.2 - - - name: Unittest for SAHI+YOLOV5/MMDET/Detectron2 on all platforms - run: | - python -m unittest - - - name: Install SAHI package from local setup.py - run: > - pip install -e . - - - name: Test SAHI CLI - run: | - # help - sahi --help - # predict mmdet - sahi predict --source tests/data/ --novisual --model_path tests/data/models/mmdet/yolox/yolox_tiny_8x8_300e_coco_20211124_171234-b4047906.pth --model_config_path tests/data/models/mmdet/yolox/yolox_tiny_8xb8-300e_coco.py --image_size 320 - sahi predict --source tests/data/coco_utils/terrain1.jpg --export_pickle --export_crop --model_path tests/data/models/mmdet/yolox/yolox_tiny_8x8_300e_coco_20211124_171234-b4047906.pth --model_config_path tests/data/models/mmdet/yolox/yolox_tiny_8xb8-300e_coco.py --image_size 320 - sahi predict --source tests/data/coco_utils/ --novisual --dataset_json_path tests/data/coco_utils/combined_coco.json --model_path tests/data/models/mmdet/yolox/yolox_tiny_8x8_300e_coco_20211124_171234-b4047906.pth --model_config_path tests/data/models/mmdet/yolox/yolox_tiny_8xb8-300e_coco.py --image_size 320 - # predict yolov5 - sahi predict --no_sliced_prediction --model_type yolov5 --source tests/data/coco_utils/terrain1.jpg --novisual --model_path tests/data/models/yolov5/yolov5s6.pt --image_size 320 - sahi predict --model_type yolov5 --source tests/data/ --novisual --model_path tests/data/models/yolov5/yolov5s6.pt --image_size 320 - sahi predict --model_type yolov5 --source tests/data/coco_utils/terrain1.jpg --export_pickle --export_crop --model_path tests/data/models/yolov5/yolov5s6.pt --image_size 320 - sahi predict --model_type yolov5 --source tests/data/coco_utils/ --novisual --dataset_json_path tests/data/coco_utils/combined_coco.json --model_path tests/data/models/yolov5/yolov5s6.pt --image_size 320 - # coco yolov5 - sahi coco yolov5 --image_dir tests/data/coco_utils/ --dataset_json_path tests/data/coco_utils/combined_coco.json --train_split 0.9 - # coco evaluate - sahi coco evaluate --dataset_json_path tests/data/coco_evaluate/dataset.json --result_json_path tests/data/coco_evaluate/result.json - # coco analyse - sahi coco analyse --dataset_json_path tests/data/coco_evaluate/dataset.json --result_json_path tests/data/coco_evaluate/result.json --out_dir tests/data/coco_evaluate/ diff --git a/.github/workflows/package_testing.yml b/.github/workflows/package_testing.yml index 9ae90195..119dd190 100644 --- a/.github/workflows/package_testing.yml +++ b/.github/workflows/package_testing.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.7, 3.8, 3.9] + python-version: [3.8, 3.9, '3.10'] fail-fast: false steps: @@ -55,21 +55,22 @@ jobs: matrix.operating-system == 'ubuntu-latest' || matrix.operating-system == 'windows-latest' run: > - pip install torch==1.10.2+cpu torchvision==0.11.3+cpu + pip install torch==1.13.1+cpu torchvision==0.14.1+cpu -f https://download.pytorch.org/whl/torch_stable.html - - name: Install PyTorch(1.10.1) and TorchVision(0.11.2) on MacOS + - name: Install PyTorch on MacOS if: matrix.operating-system == 'macos-latest' - run: pip install torch==1.10.1 torchvision==0.11.2 + run: pip install torch==1.13.1 torchvision==0.14.1 - - name: Install MMDetection(2.28.1) with MMCV(1.7.0) + - name: Install MMDetection(3.0.0) with MMCV(2.0.0) run: > - pip install mmcv-full==1.7.0 -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.10.0/index.html - pip install mmdet==2.28.1 + pip install mmengine==0.7.3 + pip install mmcv==2.0.0 -f https://download.openmmlab.com/mmcv/dist/cpu/torch1.13.0/index.html + pip install mmdet==3.0.0 - - name: Install YOLOv5(7.0.9) + - name: Install YOLOv5(7.0.13) run: > - pip install yolov5==7.0.9 + pip install yolov5==7.0.13 - name: Install DeepSparse run: > @@ -79,21 +80,21 @@ jobs: run: > python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/torch1.10/index.html - - name: Install Transformers(4.25.1) + - name: Install Transformers(4.35.0) run: > - pip install transformers==4.25.1 + pip install transformers==4.35.0 - - name: Install pycocotools(2.0.6) + - name: Install pycocotools(2.0.7) run: > - pip install pycocotools==2.0.6 + pip install pycocotools==2.0.7 - - name: Install ultralytics + - name: Install ultralytics(8.0.207) run: > - pip install ultralytics==8.0.99 + pip install ultralytics==8.0.207 - - name: Install super-gradients + - name: Install super-gradients(3.3.1) run: > - pip install super-gradients==3.1.2 + pip install super-gradients==3.3.1 - name: Install latest SAHI package run: > diff --git a/requirements.txt b/requirements.txt index 53f9522c..4b8c00a5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -opencv-python>=4.2.0.32 +opencv-python<=4.8 shapely>=1.8.0 tqdm>=4.48.2 pillow>=8.2.0 diff --git a/setup.py b/setup.py index bcde9dc1..755fba41 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ def get_version(): python_requires=">=3.6", install_requires=get_requirements(), extras_require={ - "tests": ["mmdet==2.28.1", "pycocotools==2.0.6"], + "tests": ["mmdet==3.0.0", "pycocotools==2.0.6"], "dev": [ "black==22.3.0", "flake8==3.9.2", @@ -51,10 +51,10 @@ def get_version(): "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", ],