Skip to main content

Detect Advertisement Images

Usage


pip install adlike
import requests
from PIL import Image

from adlike import ad_openai_clip_vitl_patch14_336

device = "cuda" if torch.cuda.is_available() else "cpu"
model, preprocess = ad_openai_clip_vitl_patch14_336()

url = "https://literacyideas.com/wp-content/uploads/2021/08/christmas_advertising.jpg"
image = Image.open(requests.get(url, stream=True).raw)


with torch.no_grad():
    image = preprocess(img).to(device).unsqueeze(0)
    probs = model(image)

print("Label probs:", probs)  # prints: tensor([[0.9753]])

Metadata

Release files for adlike 0.0.5

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

Source distribution (sdist)

Source distribution for adlike 0.0.5
File Size Uploaded Provenance Actions
adlike-0.0.5.tar.gz 3.4 kB Without provenance Details for adlike-0.0.5.tar.gz

Built distribution (wheel)

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

Total release size: 7.0 kB

Release files / adlike-0.0.5.tar.gz

Download URL adlike-0.0.5.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c6af5e2bb7de2935302d18f377944c56ddfa3994ca3576eb2ef037e63c1e23a0
BLAKE2b-256 checksum
How to use checksums
61195045da5aa72ef9930968e1410c5176574bb92bd9ef4ce62d5a1729b16abf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / adlike-0.0.5-py3-none-any.whl

Download URL adlike-0.0.5-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5883ecb7beb5fdffd38baa3d85d2ceb7ffc56b21097f89a09e32e84de04b531
BLAKE2b-256 checksum
How to use checksums
af0a9e3b75ff06ff2ac02e74593a8135bf675b6335073807907ebe0c48f75b6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Security for adlike 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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