![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Apsis-OCR is a Mixed language ocr system for Printed Documents developed at Apsis Solutions limited
The full system is build with 3 components:
pip install apsisocr
pip install onnxruntime
pip install fastdeploy-python -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html
It is recommended to use conda environment . Specially for GPU.
conda install cudatoolkit
conda install cudnn
pip install apsisocr
pip install onnxruntime-gpu
python -m pip install -U fastdeploy-gpu-python -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
echo 'export LD_LIBRARY_PATH=$CUDNN_PATH/lib:$CONDA_PREFIX/lib/:$LD_LIBRARY_PATH' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
It is recommended to use conda environment .
git clone https://github.com/mnansary/apsisOCR.git
cd apsisOCR
conda create -n apsisocr python=3.9
conda activate apsisocr
bash install.sh cpu
bash install.sh gpu
from apsisocr import ApsisNet
bnocr=ApsisNet()
bnocr.infer(crops)
ApsisNet.infer
"""
Perform inference on image crops.
Args:
crops (list[np.ndarray]): List of image crops.
batch_size (int): Batch size for inference (default: 32).
normalize_unicode (bool): Flag to normalize unicode (default: True).
Returns:
list[str]: List of inferred texts.
"""
from apsisocr import SVTRLCNet
enocr=SVTRLCNet()
enocr.infer(crops)
SVTRLCNet.infer
"""
Perform inference on image crops.
Args:
crops (list[np.ndarray]): List of image crops.
batch_size (int): Batch size for inference.
Returns:
list[str]: List of recognized texts.
"""
from apsisocr import DenseNet121BnEnClassifier
lang=DenseNet121BnEnClassifier()
lang.infer(crops)
DenseNet121BnEnClassifier.infer
"""
Perform inference on image crops.
Args:
crops (list[np.ndarray]): List of image crops.
batch_size (int): Batch size for inference (default: 32).
Returns:
list[str]: List of inferred languages.
"""
# initialization
from apsisocr import PaddleDBNet
detector=PaddleDBNet()
# getting word boxes
word_boxes=detector.get_word_boxes(img)
# getting line boxes
line_boxes=detector.get_line_boxes(img)
# getting crop with either of the results
crops=detector.get_crops(img,word_boxes)
from apsisocr import ApsisOCR
ocr=ApsisOCR()
results=ocr(img_path)
ApsisOCR.__call__
"""
Perform OCR on an image.
Args:
img_path (str): Path to the image file.
Returns:
dict: OCR results containing recognized text and associated information. The dictionary has the following structre
{
"text" : multiline text with newline separators
"result" : list a dictionaries that contains the following structre:
{
"line_no" : the line number of the word
"word_no" : the word number in the line
"poly" : the four point polygonal bounding box of the word in the image
"text" : the recognized text
"lang" : the classified language code
}
}
"""
check useage/useage.ipynb
for examples
cd deployment
: change directory to deployment folderconfig.py
# This port will be used by the api_ocr.py
OCR_API_PORT=3032
# This api address is diplayed after deploying api_ocr.py and this is used in app.py
OCR_API="http://172.20.4.53:3032/ocr"
python api_ocr.py # deploys at port 3032 by defautl
streamlit run app.py --server.port 3033 # deploys streamlit built frontend at 3033 port
TESTED GPU INFERENCE SERVER CONFIG
OS : Ubuntu 20.04.6 LTS
Memory : 62.4 GiB
Processor : Intel® Xeon(R) Silver 4214R CPU @ 2.40GHz × 24
Graphics : NVIDIA RTX A6000/PCIe/SSE2
Gnome : 3.36.8
Contents of this repository are restricted to non-commercial research purposes only under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).
FAQs
Bangla English Mixed Languge Scene / printed OCR Toolkit
We found that apsisocr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.