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.0.tar.gz (11.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: rembg_cars-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 f3e80e1232a8f2c26b7df8a7defea547df2a6cfb83bc0f28fc80d0ffdf063ff8
MD5 2e81f70251d34d405671854a10577ec6
BLAKE2b-256 964fa4801f845c6b35500d5572aa4f3775472324476c29355c3a47669db23845

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