A Python package for verifying consistency between multimodal data
Project description
This is a Python package for VDC: Versatile Data Cleanser Based on Semantic Inconsistency.
Installation
pip install vdc
Usage
from vdc.cleanser import DataCleanser
from vdc.utils.config import VDCConfig
config = VDCConfig(
llm_base_url="https://api.openai.com/v1/",
llm_api_key="sk-xxx",
mllm_base_url="https://api.openai.com/v1/",
mllm_api_key="sk-xxx",
)
cleanser = DataCleanser(
config=config, llm_model="gpt-4o-mini", mllm_model="gpt-4o-mini"
)
res = cleanser.process_image_text_pair(
img_path="test.jpeg",
text="A black cat is sitting on a wooden table.",
num_questions=5,
)
consistency_score = res.consistency_score
is_consistent = res.is_consistent
print(res)
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
vdc-1.0.1.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
vdc-1.0.1-py3-none-any.whl
(5.2 kB
view details)
File details
Details for the file vdc-1.0.1.tar.gz.
File metadata
- Download URL: vdc-1.0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
022ce5dd8f87565a340a8281bfd0595973eb00d8624730599576a60b7ad64533
|
|
| MD5 |
facda2bbc3255f1c886cdc23a0296198
|
|
| BLAKE2b-256 |
da74b91978377604f05e3dfa49624e6a9d764417c4abf612eb21173538693a97
|
File details
Details for the file vdc-1.0.1-py3-none-any.whl.
File metadata
- Download URL: vdc-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
176338d1f961f2a0b15424944f550751a7356614dc4b5830b234cbae7795bb5e
|
|
| MD5 |
ae4f72cac65ae382f7402735c57c8359
|
|
| BLAKE2b-256 |
765d9298e1482858988a2559b18ca1d81d306053887a138ec2a63cc713f764fc
|