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

Uploaded Source

Built Distribution

clipcrop-2.4.8-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clipcrop-2.4.8.tar.gz
  • Upload date:
  • Size: 5.7 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.8.tar.gz
Algorithm Hash digest
SHA256 735f235d4bd23be344c3a87ed27401c6c677b79ba1561de9e21235fcbf6a9e7e
MD5 8ee91ca6bd2788c1972b528bf4f05ec5
BLAKE2b-256 490d8e3a085ee4eb6c78f018ee46ec8da2cac802c468a6941ef9770a34930b17

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: clipcrop-2.4.8-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 46708be77c4e902ea3116eac52e0831da45efc904753a92b24f20174b1bc6666
MD5 ee069dfb73c46099fe785b005fe061fa
BLAKE2b-256 d65b38e8d1fb4ca277508d32d45dc6c8d33d64848528186b6c25f472188b5783

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