Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
drop conda support, update python version (#38)
Browse files Browse the repository at this point in the history
* drop conda support

* update torch and python versions

* update line length

* update min python version

* update version to v0.4.0
  • Loading branch information
fcakyon authored Jul 30, 2021
1 parent 85db67f commit 477cc2f
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 95 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/package_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/publish_conda.yml

This file was deleted.

18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<p align="center">
<a href="https://pepy.tech/project/craft-text-detector"><img src="https://pepy.tech/badge/craft-text-detector" alt="downloads"></a>
<a href="https://pypi.org/project/craft-text-detector"><img src="https://img.shields.io/pypi/pyversions/craft-text-detector" alt="downloads"></a>
<br>
<a href="https://github.com/fcakyon/craft-text-detector/actions"><img alt="Build status" src="https://github.com/fcakyon/craft-text-detector/actions/workflows/ci.yml/badge.svg"></a>
<a href="https://badge.fury.io/py/craft-text-detector"><img src="https://badge.fury.io/py/craft-text-detector.svg" alt="PyPI version" height="20"></a>
<a href="https://github.com/fcakyon/craft-text-detector/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/pypi/l/craft-text-detector"></a>
</p>

Packaged, Pytorch-based, easy to use, cross-platform version of the CRAFT text detector | [Paper](https://arxiv.org/abs/1904.01941) |

## Overview
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions conda/conda_build_config.yaml

This file was deleted.

39 changes: 0 additions & 39 deletions conda/meta.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion craft_text_detector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__ = [
Expand Down
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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"
gdown>=3.10.1
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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 = "
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 477cc2f

Please sign in to comment.