diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89a64ed..bc6c847 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.6, 3.7, 3.8] + python-version: [3.7, 3.8, 3.9] fail-fast: false steps: @@ -46,20 +46,16 @@ jobs: restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}- - name: Update pip run: python -m pip install --upgrade pip - - name: Install numpy and matplotlib for Python 3.6 - if: matrix.python-version == 3.6 - run: > - pip install "numpy<1.20" "matplotlib<4" - name: Install PyTorch on Linux and Windows if: > matrix.operating-system == 'ubuntu-latest' || matrix.operating-system == 'windows-latest' run: > - pip install torch==1.7.1+cpu torchvision==0.8.2+cpu + pip install torch==1.8.1+cpu torchvision==0.9.1+cpu -f https://download.pytorch.org/whl/torch_stable.html - name: Install PyTorch on MacOS if: matrix.operating-system == 'macos-latest' - run: pip install torch==1.7.1 torchvision==0.8.2 + run: pip install torch==1.8.1 torchvision==0.9.1 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/package_testing.yml b/.github/workflows/package_testing.yml index 8303d9b..e2ca5d6 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.6, 3.7, 3.8] + python-version: [3.7, 3.8, 3.9] fail-fast: false steps: @@ -44,20 +44,16 @@ jobs: restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}- - name: Update pip run: python -m pip install --upgrade pip - - name: Install numpy and matplotlib for Python 3.6 - if: matrix.python-version == 3.6 - run: > - pip install "numpy<1.20" "matplotlib<4" - name: Install PyTorch on Linux and Windows if: > matrix.operating-system == 'ubuntu-latest' || matrix.operating-system == 'windows-latest' run: > - pip install torch==1.7.1+cpu torchvision==0.8.2+cpu + pip install torch==1.8.1+cpu torchvision==0.9.1+cpu -f https://download.pytorch.org/whl/torch_stable.html - name: Install PyTorch on MacOS if: matrix.operating-system == 'macos-latest' - run: pip install torch==1.7.1 torchvision==0.8.2 + run: pip install torch==1.8.1 torchvision==0.9.1 - name: Install latest craft-text-detector package run: > pip install --upgrade --force-reinstall craft-text-detector diff --git a/.github/workflows/publish_conda.yml b/.github/workflows/publish_conda.yml deleted file mode 100644 index dc280ff..0000000 --- a/.github/workflows/publish_conda.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Publish Conda Package - -on: - release: - types: [published, edited] - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: free disk space - run: | - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - df -h - - name: publish-to-conda - uses: fcakyon/conda-publish-action@v1.3 - with: - subdir: 'conda' - anacondatoken: ${{ secrets.ANACONDA_TOKEN }} - platforms: 'osx linux win' \ No newline at end of file diff --git a/README.md b/README.md index 330d8f4..8cae8fd 100755 --- a/README.md +++ b/README.md @@ -2,9 +2,17 @@ [![Downloads](https://pepy.tech/badge/craft-text-detector)](https://pepy.tech/project/craft-text-detector) [![PyPI version](https://badge.fury.io/py/craft-text-detector.svg)](https://badge.fury.io/py/craft-text-detector) -[![Conda version](https://anaconda.org/fcakyon/craft-text-detector/badges/version.svg)](https://anaconda.org/fcakyon/craft-text-detector) [![CI](https://github.com/fcakyon/craft-text-detector/workflows/CI/badge.svg)](https://github.com/fcakyon/craft-text-detector/actions?query=event%3Apush+branch%3Amaster+is%3Acompleted+workflow%3ACI) +

+downloads +downloads +
+Build status +PyPI version +License: MIT +

+ Packaged, Pytorch-based, easy to use, cross-platform version of the CRAFT text detector | [Paper](https://arxiv.org/abs/1904.01941) | ## Overview @@ -17,13 +25,7 @@ PyTorch implementation for CRAFT text detector that effectively detect text area ### Installation -- Install using conda for Linux, Mac and Windows (preferred): - -```console -conda install -c fcakyon craft-text-detector -``` - -- Install using pip for Linux and Mac: +- Install using pip: ```console pip install craft-text-detector diff --git a/conda/conda_build_config.yaml b/conda/conda_build_config.yaml deleted file mode 100644 index fe5c5b3..0000000 --- a/conda/conda_build_config.yaml +++ /dev/null @@ -1,4 +0,0 @@ -python: - - 3.6 - - 3.7 - - 3.8 diff --git a/conda/meta.yaml b/conda/meta.yaml deleted file mode 100644 index 0bb24a1..0000000 --- a/conda/meta.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{% set data = load_setup_py_data() %} - -package: - name: craft-text-detector - version: {{ data['version'] }} - -source: - path: .. - -build: - number: 0 - script: python setup.py install --single-version-externally-managed --record=record.txt - -requirements: - build: - - python - - numpy>=1.11.1 - - scipy - - opencv - - pytorch>=0.4.1 - - torchvision>=0.2.1 - - run: - - python - - numpy>=1.11.1 - - scipy - - opencv - - gdown>=3.10.1 - - pytorch>=0.4.1 - - torchvision>=0.2.1 - -test: - imports: - - craft_text_detector - -about: - home: {{ data['url'] }} - license: {{ data['license'] }} -summary: {{ data['description'] }} diff --git a/craft_text_detector/__init__.py b/craft_text_detector/__init__.py index 1e14f31..1dba311 100644 --- a/craft_text_detector/__init__.py +++ b/craft_text_detector/__init__.py @@ -8,7 +8,7 @@ import craft_text_detector.predict as predict import craft_text_detector.torch_utils as torch_utils -__version__ = "0.3.5" +__version__ = "0.4.0" __all__ = [ diff --git a/requirements.txt b/requirements.txt index ddedd05..e4674ce 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ -torch>=0.4.1 -torchvision>=0.2.1 +torch>=1.6.0 +torchvision>=0.7.0 opencv-python>=3.4.8.29 scipy>=1.3.2 -gdown>=3.10.1 -dataclasses; python_version<"3.7" \ No newline at end of file +gdown>=3.10.1 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index b8460f2..f19b634 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [flake8] -max-line-length = 119 +max-line-length = 120 exclude =.git,__pycache__,docs/source/conf.py,build,dist ignore = I101,I201,F401,F403,S001,D100,D101,D102,D103,D104,D105,D106,D107,D200,D205,D400,W504,D202,E203,W503,B006 inline-quotes = " diff --git a/setup.py b/setup.py index 0b0b592..ff4fbf9 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ def get_version(): url="https://github.com/fcakyon/craft_text_detector", packages=setuptools.find_packages(exclude=["tests"]), install_requires=get_requirements(), - python_requires=">=3.6", + python_requires=">=3.7", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License",