Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

PinkPixel
/
fey-nobg-onnx

Image Segmentation
ONNX
nobg
background-removal
image-matting
onnxruntime
feynobg
soft-alpha
transparency
rgba
Model card Files Files and versions
xet
Community

Instructions to use PinkPixel/fey-nobg-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • nobg

    How to use PinkPixel/fey-nobg-onnx with nobg:

    pip install nobg
    # Option 1: use via the predict method
    
    from nobg import AutoModel, AutoProcessor
    
    model = AutoModel.from_pretrained("PinkPixel/fey-nobg-onnx").eval()
    processor = AutoProcessor.from_pretrained("PinkPixel/fey-nobg-onnx")
    
    cutout = model.predict(processor, "image.jpg")
    # Option 2: use the model and processor directly
    
    import torch
    from loadimg import load_img
    from nobg import AutoModel, AutoProcessor
    
    model = AutoModel.from_pretrained("PinkPixel/fey-nobg-onnx").eval()
    processor = AutoProcessor.from_pretrained("PinkPixel/fey-nobg-onnx")
    
    image = load_img("image.jpg").convert("RGB")
    inputs = processor(image, return_tensors="pt")
    
    with torch.no_grad():
        outputs = model(pixel_values=inputs["pixel_values"])
    
    alpha = processor.post_process_alpha_matting(outputs, target_sizes=[(image.height, image.width)])[0]
    processor.cutout(image, alpha).save("output.png")
  • Notebooks
  • Google Colab
  • Kaggle
fey-nobg-onnx
5.48 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
sizzlebop's picture
sizzlebop
Upload 5 files
223f80f verified 25 days ago
  • .gitattributes
    1.52 kB
    initial commit 27 days ago
  • LICENSE
    11.5 kB
    Upload 5 files 27 days ago
  • README.md
    6.92 kB
    Upload 5 files 25 days ago
  • infer.py
    6.85 kB
    Upload 5 files 27 days ago
  • model.onnx
    1.12 GB
    xet
    Upload 5 files 27 days ago
  • model_fp16.onnx
    564 MB
    xet
    Upload 5 files 25 days ago
  • model_int8.onnx
    1.28 GB
    xet
    Upload 5 files 25 days ago
  • model_q4.onnx
    1.24 GB
    xet
    Upload 5 files 25 days ago
  • model_uint8.onnx
    1.28 GB
    xet
    Upload 5 files 25 days ago
  • requirements.txt
    48 Bytes
    Upload 5 files 27 days ago