image processing and stuff
Project description
image2layout_computer_vision
An image processing module for some computer vision tasks (public module for image2layout)
Package Page: pypi
Features:
- Text Detection
- Color extraction (background and main foreground)
Installations
Install with python
/conda
[Linux]
- (Optional) Conda
curl https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh -o ~/conda.sh
bash ~/conda.sh -b -f -p /opt/conda
rm ~/conda.sh
conda init --all --dry-run --verbose
conda create -n cv python=3.10 -y
conda activate cv
- Tesseract
sudo apt install tesseract-ocr libtesseract-dev -y
- Python libraries (python>=3.8)
python -m pip install 'torch>=2.0' torchvision torchaudio
python -m pip install Pillow pandas numpy scikit-learn pyyaml==5.1 chardet pytesseract
python -m pip install --upgrade datasets transformers
python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
python -m pip install --upgrade image2layout-computer-vision
Install with docker
Replace Dockerfile_cpu
with Dockerfile
if running with GPU
API Implementation is in-progress
sudo docker build --tag cv -f Dockerfile_cpu .
sudo docker run -it -v $(pwd):/app cv bash
Usage
Python
import image2layout_computer_vision as icv
imageboxes = icv.detect_text('path/to/image.png')
boxes = icv.detect_text_boxes('path/to/image.png')
color_bg, color_fg = icv.extract_colors('path/to/image.png')
Build
(for building and uploading this package)
python -m pip install --upgrade pip
python -m pip install --upgrade build twine
rm -rf dist
python -m build
python -m twine upload dist/* --verbose
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for image2layout_computer_vision-0.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd6b5dcf4d34785fc3c06bc8d03d5909aea726a10a5f0dc8ea857c021a12e64e |
|
MD5 | 4d5ffbe53881f9c5d89c71356a0859b6 |
|
BLAKE2b-256 | 85e7caa98c1d6e2132fbccadec2c50d3d25f9c89c96cda8353ca08bbfcb0d7fe |
Close
Hashes for image2layout_computer_vision-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ab4e8db4ef85295cce8d8cdfd3c678edd1e5af44a93fa63a249b85b9e7ee7e7 |
|
MD5 | e90a5bcb7ce84f0733ceae8eb888430f |
|
BLAKE2b-256 | 58815f4665e37e9c0dffc9a56400002100bb81d0b6731cd799ee5fee39c21504 |