Skip to main content

Remove image background from cars

Project description

rembg_carros

Extension of Rembg tool to remove backgrounds for adding a car custom model from library

Requirements

How to install torch/torchvision

Go to https://pytorch.org and scrool down to INSTALL PYTORCH section and follow the instructions.

Installation

Install it from pypi

pip install rembg_carros

Usage as a library

Example: Using PIL

In app.py

from rembg.bg import remove
import numpy as np
import io
from PIL import Image
input_path = 'input.png'
output_path = 'out.png'
f = np.fromfile(input_path)
result = remove(f,model_name="carros")
img = Image.open(io.BytesIO(result)).convert("RGBA")
img.save(output_path)

Then run

python app.py

References

License

Copyright (c) 2021 poropeza Peter Oropeza

Licensed under MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rembg_cars-1.0.1.tar.gz (11.6 kB view details)

Uploaded Source

File details

Details for the file rembg_cars-1.0.1.tar.gz.

File metadata

  • Download URL: rembg_cars-1.0.1.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.0

File hashes

Hashes for rembg_cars-1.0.1.tar.gz
Algorithm Hash digest
SHA256 725f1a44d0a49f2b45acd284a18dc7d0cbd73d4d0ed99f877e4a888cf00b960a
MD5 3a0c2b63689754a2fbd3374298e3658f
BLAKE2b-256 5e45f8e87c775e91f12fbc8c7b867c8afb28e51506ccfe43c9266fa95e4cf884

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page