HTTP service wrapper for U^2-Net

https://github.com/NathanUA/U-2-Net

The source code for wrapping U^2-Net as an http server is now available!

As shown in the previous article, U^2-Net is an attractive machine learning model that can create human portrait drawing from human photo. However, to use this machine model requires a Python environment like that used by developers and is not easily accessible to end-users.

Therefore, in order to make it available to end-users as a web service, like any other service, I have prepared a repository that wraps this machine learning model as an HTTP service. Although this can not be used in final product, but I think it is enough to be used as a reference source code to build a web server. Please try it out for yourself!

U^2Net HTTP Demo

How to use

Run server

To start the server, simply call main.py.

The default source code accepts requests from clients on port 8080 on localhost.

Post an image to test server

Let’s try posting an image from the client to see if the server is working correctly.

Input image

If successful, the image of the posted human photo will be converted into an illustration on the server and returned to the client!

Output image

The image you post to the server can be any human image. Next, try it with an image of your choice!

--

--

--

I love programming.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to run a Laravel Application into Kubernetes

Customize Bootstrap or other toolkits, ui-frameworks or ui-libraries

iOS Sticky Header with Multiple Tabs

Most commonly used Linux commands

Amazon EFS — Possible design options — Uses cases where you may not need AWS Batch or AWS EMR

The Future of Programming: Low Code AI Tools

Must-Know HTML Interview Question as a Frontend Developer

Understanding the GRASP Design Patterns

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
adakoda

adakoda

I love programming.

More from Medium

Building an android application to control Tello drone flight and perform real-time object…

How to Extract Handwritten & Printed Text Accurately with DEEPREAD Free Form: Part 1

StarCraft 2 — object recognition

Fantastic Hypebeasts and Where to Find Them