Requires Jetpack 6.1, CUDA 12.6, and TensorRT 10.3 for GPU acceleration.
sudo apt install -y python3-venv nvidia-opencvMake sure you are running a supported Jetpack version:
sudo apt install -y nvidia-l4t-cuda libnvinfer10 libnvinfer-plugin10 libnvonnxparsers10python3 -m venv .env --system-site-packages
source .env/bin/activate
pip install --upgrade pip setuptools wheelReplace <SCANBOT_SDK_VERSION> with the actual version number of the SDK you want to install.
export SCANBOT_SDK_VERSION=<SCANBOT_SDK_VERSION>-
On ARM64 (Raspberry Pi, Jetson Nano, etc.):
pip install https://github.com/doo/scanbot-sdk-example-linux/releases/download/standalone-sdk%2Fv${SCANBOT_SDK_VERSION}/scanbotsdk-${SCANBOT_SDK_VERSION}-py3-none-linux_aarch64.whl
-
On x86_64 (Ubuntu/Debian Desktop, Servers):
pip install https://github.com/doo/scanbot-sdk-example-linux/releases/download/standalone-sdk%2Fv${SCANBOT_SDK_VERSION}/scanbotsdk-${SCANBOT_SDK_VERSION}-py3-none-linux_x86_64.whl
python -c "import scanbotsdk"To avoid throttling, set max GPU/CPU/memory clocks:
sudo jetson_clocks --store
sudo jetson_clocksRestore defaults later:
sudo jetson_clocks --restoresudo apt install -y python3-venv python3-opencvpython3 -m venv .env --system-site-packages
source .env/bin/activate
pip install --upgrade pip setuptools wheelReplace <SCANBOT_SDK_VERSION> with the actual version number of the SDK you want to install.
export SCANBOT_SDK_VERSION=<SCANBOT_SDK_VERSION>-
On ARM64 (Raspberry Pi, Jetson Nano, etc.):
pip install https://github.com/doo/scanbot-sdk-example-linux/releases/download/standalone-sdk%2Fv${SCANBOT_SDK_VERSION}/scanbotsdk-${SCANBOT_SDK_VERSION}-py3-none-linux_aarch64.whl
-
On x86_64 (Ubuntu/Debian Desktop, Servers):
pip install https://github.com/doo/scanbot-sdk-example-linux/releases/download/standalone-sdk%2Fv${SCANBOT_SDK_VERSION}/scanbotsdk-${SCANBOT_SDK_VERSION}-py3-none-linux_x86_64.whl
python -c "import scanbotsdk"- x86/x86_64 CPU
- Python 3.6+ (32/64-bit)
- PowerShell
- OpenCV (only for examples)
The snippets below are written for PowerShell, not cmd.
python -m venv .env --system-site-packages
. .\.env\Scripts\Activate.ps1
python -m pip install --upgrade pip setuptools wheel
python -m pip install opencv-pythonReplace <SCANBOT_SDK_VERSION> with the actual version number of the SDK you want to install.
$SCANBOT_SDK_VERSION = "<SCANBOT_SDK_VERSION>"-
Python x86_64 (64-bit):
pip install https://github.com/doo/scanbot-sdk-example-linux/releases/download/standalone-sdk%2Fv${SCANBOT_SDK_VERSION}/scanbotsdk-${SCANBOT_SDK_VERSION}-py3-none-win_amd64.whl
-
Python x86 (32-bit):
pip install https://github.com/doo/scanbot-sdk-example-linux/releases/download/standalone-sdk%2Fv${SCANBOT_SDK_VERSION}/scanbotsdk-${SCANBOT_SDK_VERSION}-py3-none-win32.whl
python -c "import scanbotsdk"The example supports five modes: scan, analyze, enhance, parse, and live.
python main.py scan <subcommand> --file <path/to/file.jpg> [--license <KEY>]
python main.py analyze <subcommand> --file <path/to/file.jpg> [--save <out.jpg>] [--license <KEY>]
python main.py enhance <subcommand> --file <path/to/file.jpg> [--save <out.jpg>] [--mask <path/to/mask.jpg>] [--license <KEY>]
python main.py parse <subcommand> --text "<input>" [--license <KEY>]
python main.py live <subcommand> --device "<device-input>" [--license <KEY>] [--preview] [--use_tensorrt]python main.py scan barcode --file images/example.jpg --license <KEY>
python main.py analyze analyze_multi_page --file files/doc.pdf --license <KEY>
python main.py analyze crop_analyze --file images/doc.jpg --save out/crop.jpg --license <KEY>
python main.py enhance straighten_document --file images/doc.jpg --license <KEY>
python main.py enhance cleanup_document --file ../../test-scripts/test-images/highlighted.png --mask ../../test-scripts/test-images/highlighted_mask_001.png --save out/cleaned.jpg --license <KEY>
python main.py parse mrz --text "P<UTOERIKSSON<<ANNA<MARIA<<<<<<" --license <KEY>
python main.py live barcode --device "0" --license <KEY>