Skip to main content

Remove image background from cars

Project description

rembg_cars

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

Uploaded Source

File details

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

File metadata

  • Download URL: rembg_cars-1.0.3.tar.gz
  • Upload date:
  • Size: 11.7 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.3.tar.gz
Algorithm Hash digest
SHA256 8d43280893e9011c25eb1552d75ed1386cbd234d492c75826852890b0fd592b3
MD5 330ca9722d0ec10ebf667926f1d85fd2
BLAKE2b-256 2b22a88fe9c682c24e6a0f450089e1a9c143c1e77a0aa50a5fc7e2492745e70d

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