Skip to content

vzool/MRZ_DETECTION

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Integration

Environemnt

conda create -n mrz_detection python=3.8

conda activate mrz_detection

Requirment,

pip install -r requirements.txt

Inference

  1. Put the model mrz_detection_best.pt into mrz_detection_api/ai_models directory. download model please click here

  2. Active virtual environment and open terminal into mrz_detection_api folder.

Run,

python3 -m test.test

input: ./data

output: ./logs

check the logs folder for detected mrz

Integration

import sys
sys.path.insert(0, './mrz_detection_api')

from mrz_detection_api.mrz_detect import load_model, inference

# def start_processing(model, image, output_dir="logs"):
img_file = './mrz_detection_api/data/1.jpg'
model_path_dir = './mrz_detection_api/ai_models/mrz_detection_best.pt'
image = cv2.imread(img_file)
model = load_model(model_path_dir)
box = inference(model, image)

About

MRZ Detection Using Yolov7

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Other 0.7%