Skip to main content

Extract sections from your image by using OpenAI CLIP and Facebooks Detr implemented on HuggingFace Transformers

Project description

clipcrop

  • Extract sections of images from your image by using OpenAI's CLIP and YoloSmall implemented on HuggingFace Transformers
  • Added new capability for segmentation using CLIP and Detr segmentation models

Installation

pip install clipcrop

Clip Crop

Extract sections of images from your image by using OpenAI's CLIP and YoloSmall implemented on HuggingFace Transformers

Extraction

from clipcrop import clipcrop

cc = clipcrop.ClipCrop("/content/sample.jpg")

DFE, DM, CLIPM, CLIPP = cc.load_models()

result = cc.extract_image(DFE, DM, CLIPM, CLIPP, "text content", num=2)

Captcha

Solve captacha images using CLIP and Object detection models. Ensure Tesseract is installed and executable in your path

from clipcrop import clipcrop

cc = clipcrop.ClipCrop(image_path)

DFE, DM, CLIPM, CLIPP = cc.load_models()

result = cc.auto_captcha(CLIPM, CLIPP, 4)

Clip Segmentation

Segment out images using Detr Panoptic segmentation pipeline and leverage CLIP models to derive the most probable one for your query

Extraction

from clipcrop import clipcrop

clipseg = clipcrop.ClipSeg("/content/input.png", "black colored car")

segmentor, clipmodel, clipprocessor = clipseg.load_models()

result = clipseg.segment_image(segmentor, clipmodel, clipprocessor)

Remove Background

from clipcrop import clipcrop

clipseg = clipcrop.ClipSeg("/content/input.png", "black colored car")

result = clipseg.remove_background()

Other projects

Contact

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

clipcrop-2.4.9.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

clipcrop-2.4.9-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file clipcrop-2.4.9.tar.gz.

File metadata

  • Download URL: clipcrop-2.4.9.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for clipcrop-2.4.9.tar.gz
Algorithm Hash digest
SHA256 b64d573949f9c1437c0d89a8a1be520368f0b5af8e4e76555f1cb550860244fb
MD5 bf7e3b55279d4128c702299e5d7aec43
BLAKE2b-256 3c581a09d1f8163349f388b08ef280c504253d5300e8d7b83375ee312fbfa654

See more details on using hashes here.

Provenance

File details

Details for the file clipcrop-2.4.9-py3-none-any.whl.

File metadata

  • Download URL: clipcrop-2.4.9-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for clipcrop-2.4.9-py3-none-any.whl
Algorithm Hash digest
SHA256 90548cf1b2487bb1573eb81b75c2b23a446df36fb117490725a02cd8114d0e5d
MD5 faa181a08ac983938c721c234f316b8e
BLAKE2b-256 58bdff148def19b583a60a58575ca97612c0ccde04394022ff7148f7370cc73a

See more details on using hashes here.

Provenance

Supported by

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