lanms-contrib is a python binding for LANMS - Locality-Aware Non-Max Suppression
Project description
Locality-Aware Non-Maximum Suppression (LANMS) Contrib version
This is a python binding for LANMS as described by Zhout et al. in their paper "EAST: An Efficient and Accurate Scene Text Detector", CVPR 2017. The C++ code is taken from the implementation available on: https://github.com/argman/EAST
Installation
pip install lanms-contrib
Usage example
import numpy as np
import lanms
## DEFAULT FOR DENSE ROTATED BOUDNDBOXING
boxes = np.array([
[137.0, 113.6, 162.3, 113.3, 162.4, 122.2, 137.2, 122.6, 0.75],
[137.2, 113.8, 163.2, 114.6, 163.0, 122.6, 137.0, 121.9, 0.97],
[136.8, 113.4, 163.2, 114.5, 162.9, 122.7, 136.5, 121.6, 0.15],
[136.6, 112.9, 163.3, 114.5, 162.8, 122.9, 136.1, 121.3, 0.95],
[136.4, 112.6, 163.4, 114.5, 162.8, 123.0, 135.8, 121.2, 0.96],
[131.4, 89.2, 137.8, 89.0, 138.2, 98.5, 131.8, 98.7, 0.98],
[131.6, 89.2, 137.8, 89.1, 138.1, 98.6, 131.8, 98.8, 0.32],
[131.5, 89.2, 137.9, 89.1, 138.0, 98.6, 131.6, 98.7, 0.99],
[131.5, 89.2, 138.0, 89.1, 138.1, 98.5, 131.6, 98.5, 0.87],
[131.5, 89.3, 137.8, 89.0, 138.2, 98.4, 132.0, 98.7, 0.97]
], dtype=np.float32)
boxes = lanms.merge_quadrangle_n9(boxes, nms_thresh=0.5)
print(boxes)
## FOR NON-DENSE ROTATED BOUDNDBOXING, NO LOCAL MERGE STAGE BEFORE STANDARD NMS
boxes = np.array([
[137.0, 113.6, 162.3, 113.3, 162.4, 122.2, 137.2, 122.6],
[137.2, 113.8, 163.2, 114.6, 163.0, 122.6, 137.0, 121.9],
[136.8, 113.4, 163.2, 114.5, 162.9, 122.7, 136.5, 121.6],
], dtype=np.float32)
scores = np.array([0.75, 0.97, 0.15])
keep_idx = lanms.merge_quadrangle_standard(boxes, scores, nms_thresh=0.2)
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 Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lanms_contrib-1.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: lanms_contrib-1.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19e0c4bbdaaf536d5c7a518eb90be1e271deb2ed5ed44723d806997f0167fec3
|
|
| MD5 |
d4e2e13b4636ff8531829d023f17bcbc
|
|
| BLAKE2b-256 |
49f5780a2444215074bf8a554e9b9c7d38576385baed1e5321a227b7317e9f58
|
File details
Details for the file lanms_contrib-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: lanms_contrib-1.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f0e56030ff71a163ff1bd7d9fd752385b88393c84c0a158097287a24e7ab951
|
|
| MD5 |
c493bcef95e5f1c2cac7fc14d135c2bb
|
|
| BLAKE2b-256 |
9c971fc67385e95e5247101810535f15a3620bb031909bc5f2248b2c19e1486c
|
File details
Details for the file lanms_contrib-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: lanms_contrib-1.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d99d425be67227ef975cbb14afd2054c5eb1a04314eeb75c0e4d92845adb701
|
|
| MD5 |
6aff07ab2556050ade6e196d2ddd32fe
|
|
| BLAKE2b-256 |
6b6dd53147f271bf3657e4d02dfd4f2772a9dfed2de82e070f6fbd25d0a9530b
|
File details
Details for the file lanms_contrib-1.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: lanms_contrib-1.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcf5f40eec874e8e596b49a73aa7d8888eacbdc21c94a2e29ac1ccd5c7aa3afd
|
|
| MD5 |
add5098981b169de2082a37051b857f4
|
|
| BLAKE2b-256 |
1931c814903207d8f7178f289df6796953cd857d30d5cd70f2d038d4a032e14a
|
File details
Details for the file lanms_contrib-1.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: lanms_contrib-1.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeda99045b6bbc3cc8a8b441bdcf2a97fff599ca802464cc0941ed1b5a52e564
|
|
| MD5 |
df00ed46682a5d6d3df58dd80fc6baba
|
|
| BLAKE2b-256 |
890f1744fcfd6e97d22455166c5706cf91f35ec56e09bed15e2fdf69c1c61702
|