HivisionIDPhotos / README.md
gordonchan's picture
Update README.md
760cbfd verified

A newer version of the Gradio SDK is available: 5.5.0

Upgrade
metadata
title: HivisionIDPhotos
app_file: app.py
sdk: gradio
sdk_version: 4.29.0

HivisionIDPhoto

English / 中文

GitHub SwanHub Demo zhihu

🤩Project Update

  • Online Demo: SwanHub Demo
  • 2023.7.15: A Python library is planned for release!
  • 2023.6.20: Updated Forecast Size Selection
  • 2023.6.19: Updated Layout photo
  • 2023.6.13: Updated center gradient color
  • 2023.6.11: Updated top and bottom gradient color
  • 2023.6.8: Updated custom size
  • 2023.6.4: Updated custom background color and face detection bug notification
  • 2023.5.10: Updated change background without changing size

Overview

🚀Thank you for your interest in our work. You may also want to check out our other achievements in the field of image processing. Please feel free to contact us at zeyi.lin@swanhub.co.

HivisionIDPhoto aims to develop a practical intelligent algorithm for producing ID photos. It uses a complete set of model workflows to recognize various user photo scenarios, perform image segmentation, and generate ID photos.

HivisionIDPhoto can:

  1. Perform lightweight image segmentation
  2. Generate standard ID photos and six-inch layout photos according to different size specifications
  3. Provide beauty features (waiting)
  4. Provide intelligent formal wear replacement (waiting)

If HivisionIDPhoto is helpful to you, please star this repo or recommend it to your friends to solve the problem of emergency ID photo production!

🔧Environment Dependencies and Installation

  • Python >= 3.7 (Recommend to use Anaconda or Miniconda)
  • onnxruntime
  • OpenCV
  • Option: Linux, Windows, MacOS

Installation

  1. Clone repo
git lfs install && git clone https://swanhub.co/ZeYiLin/HivisionIDPhotos.git
cd  HivisionIDPhotos
  1. Install dependent packages
pip install numpy
pip install opencv-python
pip install onnxruntime
pip install gradio

⚡️Quick Inference

1. Download Pre-trained Models

SwanHub:

The model and code are downloaded through git-lfs.

git lfs install
git clone https://swanhub.co/ZeYiLin/HivisionIDPhotos.git

GitHub:

git clone https://github.com/xiaolin199912/HivisionIDPhotos.git
Model Parameters Dir Download Link
hivision_modnet.onnx 25 M ./ Download

2. Inference!

Run a Gradio Demo:

python app.py

Running the program will generate a local web page where you can complete ID photo operations and interactions.

Reference Projects

  1. MTCNN: https://github.com/ipazc/mtcnn
  2. MTCNN-ONNX:https://swanhub.co/ZeYiLin/MTCNN-ONNX
  3. ModNet: https://github.com/ZHKKKe/MODNet

📧Contact

If you have any questions, please email Zeyi.lin@swanhub.co

Copyright © 2023, ZeYiLin. All Rights Reserved.