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

Uploaded Source

File details

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

File metadata

  • Download URL: rembg_cars-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 8a3a2ea7490e26ddcdf1b656052c2cebb3355f6d3c7fdbac015d7077322963fb
MD5 101884ed5ef303adb06a3418afac380e
BLAKE2b-256 41e3cac924d2d22a0996184c5a292ddb389b3a7c5338bf3583e04fed0007d44b

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