This project is a toolbox for image processing and deep learning, primarily consisting of the following components:
- Vision: Functions related to computer vision, such as image and video processing.
- Structures: Modules for handling structured data, such as BoundingBox and Polygon.
- ONNXEngine: Provides ONNX inference capabilities, supporting ONNX format models.
- Torch: Related to PyTorch, including neural network architectures, optimizers, etc.
- Utils: Miscellaneous utilities that do not fit into other categories.
- Tests: Test files for verifying the functionality of various functions.
For installation and usage instructions, please refer to the DocsaidKit Documents.
Here, you will find all the detailed information about this project.
Before installing DocsaidKit, ensure your system meets the following requirements:
- Ensure Python 3.8 or higher is installed on your system.
Install the required dependencies based on your operating system.
-
Ubuntu
Open the terminal and run the following commands to install dependencies:
sudo apt install libturbojpeg exiftool ffmpeg libheif-dev
-
MacOS
Use brew to install dependencies:
brew install jpeg-turbo exiftool ffmpeg libheif
pdf2image is a Python module for converting PDF documents into images.
Follow these instructions to install it based on your operating system:
-
For detailed installation instructions, refer to the pdf2image project page.
-
MacOS: Mac users need to install poppler. Install it via Brew:
brew install poppler
-
Linux: Most Linux distributions come with
pdftoppm
andpdftocairo
pre-installed.If not, install poppler-utils via your package manager:
sudo apt install poppler-utils
-
Clone the repository:
git clone https://github.com/DocsaidLab/DocsaidKit.git
-
Install the wheel package:
pip install wheel
-
Build the wheel file:
cd DocsaidKit python setup.py bdist_wheel
-
Install the built wheel package:
pip install dist/docsaidkit-*-py3-none-any.whl
To install the version that supports PyTorch:
pip install "dist/docsaidKit-${version}-none-any.whl[torch]"
Install via Docker to ensure environment consistency.
Use the following commands:
cd DocsaidKit
bash docker/build.bash
Once completed, run your commands within Docker:
docker run -v ${PWD}:/code -it docsaid_training_base_image your_scripts.py
For the specifics of the build file, refer to: Dockerfile
To ensure the stability and accuracy of DocsaidKit, we use pytest
for unit testing.
Users can run the tests themselves to verify the accuracy of the functionalities they are using.
To run the tests:
python -m pytest tests