Voinic / u2net-keras

Minimal scripts for testing U-2-Net models in Keras

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

u2net-keras

Simple scripts for testing U-2-Net models in Keras.
Based on https://github.com/NathanUA/U-2-Net and https://github.com/shreyas-bk/U-2-Net-Keras
Keras u2net, u2netp and u2net_portrait models were converted from the original pytorch models.

Quick start

  1. Clone this repo to local
git clone https://github.com/Voinic/u2net-keras.git
  1. Get models from here

  2. Test u2net/u2netp (background substraction) models

python u2net-keras.py images/input.jpg images/output.png
  1. Test u2net_portrait model
python u2net_portrait-keras.py images/input_portrait.jpg images/output_portrait.png

Results

Background substraction model
input
output
Portrait creation model
input_portrait
output_portrait

Known issues

  • Dont work with tensorflow without CUDA support.

About

Minimal scripts for testing U-2-Net models in Keras

License:MIT License


Languages

Language:Python 100.0%