Skip to main content

ClipQ (WIP)

An easy-to-use interface for experimenting with OpenAI's CLIP model by encoding image quadrants. By splitting images into quadrants and encoding each with CLIP, we can explore how the model perceives various parts of an image.

Appreciation

Table of Contents

Installation

Install the package via pip:

pip install clipq

Quickstart

Here's a brief example to get you started:

from clipq.main import CLIPQ

#init
test = CLIPQ(query_text="A photo of a cat")

#input, url => embed
vectors = test.run_from_url(url="https://picsum.photos/800", h_splits=3, v_splits=3)

#print
print(vectors)

Documentation

Contributing

  1. Fork the repository on GitHub.
  2. Clone the forked repository to your machine.
  3. Create a new branch with an appropriate name.
  4. Make your changes and commit with a meaningful commit message.
  5. Push your changes to your forked repository.
  6. Create a Pull Request against the original repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Todo

  • Output captions of all 4 quadrants
  • Make captions using any of the following: openclip G, OpenCLIP G or siglip L or EVA G
  • Image Division: Ability to split an image into quadrants (2x2). Extended ability to split an image into 9 equal parts (3x3).
  • Vector Representation: Generation of a CLIP vector for the entire image and individual CLIP vectors for each split part or quadrant.
  • Sub-clip Concerns: Identification of hard chunking issues with standard quadrant splitting.
  • Noise Reduction: Introduction of non-standard shapes (possibly polygons) for image parts to reduce noise. Aim to tackle interlacing issues during upscaling.
  • Upscaling: Address potential tiling issues during the upscaling process.
  • Flexibility in Sub-clipping: Configurable options to choose between 2x2 or 3x3 image division.
  • Prior Training: Training mechanism to use the data of quadrant CLIP vectors.

Release files for clipq 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clipq 0.0.7
File Size Uploaded
clipq-0.0.7.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clipq 0.0.7
File Interpreter ABI Platform
clipq-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / clipq-0.0.7.tar.gz

Download URL clipq-0.0.7.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ac72e69355c66f0c320f584903cc8f227f9122f372bb5a24d5fddcd0a262faa7
BLAKE2b-256 checksum
How to use checksums
9538e4e33e375a3e7021df81f3b173220109b13d45e9c33517d225b6d9fcbc9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

Release files / clipq-0.0.7-py3-none-any.whl

Download URL clipq-0.0.7-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a87e76453951e717151f8ce3989b7da8e2d5072903146c51f6e523c8543b7aeb
BLAKE2b-256 checksum
How to use checksums
3dfe762a5c1d2c324997e2f9a405c820011f975eb25265a83b1888ce8cfb26f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page