Skip to main content

ISCC - Semantic Code Image

Project description

ISCC - Semantic Image-Code

Tests Version Downloads

iscc-sci is a proof of concept implementation of a semantic Image-Code for the ISCC (International Standard Content Code). Semantic Image-Codes are designed to capture and represent the semantic content of images for improved similarity detection.

[!CAUTION] This is a proof of concept. All releases with version numbers below v1.0.0 may break backward compatibility and produce incompatible Semantic Image-Codes. The algorithms of this iscc-sci repository are experimental and not part of the official ISO 24138:2024 standard.

What is ISCC Semantic Image-Code

The ISCC framework already comes with an Image-Code that is based on perceptual hashing and can match near duplicates. The ISCC Semantic Image-Code is planned as a new additional ISCC-UNIT focused on capturing a more abstract and broad semantic similarity. As such the Semantic Image-Code is engineered to be robust against a broader range of variations that cannot be matched with the perceptual Image-Code.

Features

  • Semantic Similarity: Leverages deep learning models to generate codes that reflect the semantic content of images.
  • Bit-Length Flexibility: Supports generating codes of various bit lengths (up to 256 bits), allowing for adjustable granularity in similarity detection.
  • ISCC Compatible: Generates codes that are fully compatible with the ISCC specification, facilitating integration with existing ISCC-based systems.

Installation

Before you can install iscc-sci, you need to have Python 3.8 or newer installed on your system. Install the library as any other python package:

pip install iscc-sci

Usage

To generate a Semantic Image-Code for an image, use the code_image_semantic function. You can specify the bit length of the code to control the level of granularity in the semantic representation.

import iscc_sci as sci

# Generate a 64-bit ISCC Semantic Image-Code for an image file
image_file_path = "path/to/your/image.jpg"
semantic_code = sci.code_image_semantic(image_file_path, bits=64)

print(semantic_code)

How It Works

iscc-sci uses a pre-trained deep learning model based on the 1st Place Solution of the Image Similarity Challenge (ISC21) to create semantic embeddings of images. The model generates a feature vector that captures the essential characteristics of the image. This vector is then binarized to produce a Semantic Image-Code that is robust to variations in image presentation but sensitive to content differences.

Development

This is a proof of concept and welcomes contributions to enhance its capabilities, efficiency, and compatibility with the broader ISCC ecosystem. For development, you'll need to install the project in development mode using Poetry.

git clone https://github.com/iscc/iscc-sci.git
cd iscc-sci
poetry install

Contributing

Contributions are welcome! If you have suggestions for improvements or bug fixes, please open an issue or pull request. For major changes, please open an issue first to discuss what you would like to change.

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

iscc_sci-0.2.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iscc_sci-0.2.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file iscc_sci-0.2.0.tar.gz.

File metadata

  • Download URL: iscc_sci-0.2.0.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.0 Windows/10

File hashes

Hashes for iscc_sci-0.2.0.tar.gz
Algorithm Hash digest
SHA256 edf540f4900e1c777fb9c6d9ae90fff091907f05b2b3a83478cd36ee31491ba0
MD5 368583d030d97dea31a87a735f756bfe
BLAKE2b-256 7137a1e283c4915f010012f00aaab3d3d0568b8de9810467066f0351443adc6a

See more details on using hashes here.

File details

Details for the file iscc_sci-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: iscc_sci-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.12.0 Windows/10

File hashes

Hashes for iscc_sci-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ca00161a8df0a34811bc01d3ae33babd1edff6b2135083566cee7f94bc46178
MD5 f4a34ef6d2a8280461eba6dc4e8abfa4
BLAKE2b-256 72be5725dd11804cefb0799165ca3270f7b87531dde14947d66f533a1f5053bc

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