File size: 2,025 Bytes
cbeb83b
 
f761027
 
 
cbeb83b
 
 
f761027
 
cbeb83b
 
f761027
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: Tattoo Search Engine
emoji: 🎨
colorFrom: purple
colorTo: pink
sdk: docker
pinned: false
license: mit
app_port: 7860
suggested_hardware: t4-small
---

# Tattoo Search Engine 🎨

A powerful AI-powered tattoo search engine that finds similar tattoos based on visual similarity. Upload an image of a tattoo and discover visually similar designs from across the web.

## Features

- **Multi-Model Support**: Choose from CLIP, DINOv2, or SigLIP embedding models
- **Advanced Search**: Combines image captioning with visual similarity search
- **Patch Attention Analysis**: Detailed analysis of which parts of tattoos are most similar
- **Real-time Processing**: Fast image processing and similarity computation
- **Multiple Platforms**: Searches across various tattoo platforms and image sources

## API Endpoints

### `POST /search`
Search for similar tattoos by uploading an image.

**Parameters:**
- `file`: Image file (required)
- `embedding_model`: Model to use - "clip", "dinov2", or "siglip" (default: "clip")
- `include_patch_attention`: Enable detailed patch analysis (default: false)

### `POST /analyze-attention`
Analyze patch-level attention between two images.

**Parameters:**
- `query_file`: Query image file (required)
- `candidate_url`: URL of candidate image to compare (required)
- `embedding_model`: Model to use (default: "clip")
- `include_visualizations`: Include attention visualizations (default: true)

### `GET /models`
Get available embedding models and their configurations.

### `GET /health`
Health check endpoint.

## Models Used

- **Image Captioning**: GLM-4.5V via HuggingFace Inference API
- **Visual Similarity**: CLIP ViT-B/32, DINOv2, or SigLIP
- **Search**: Multi-platform web search with intelligent filtering

## Usage

1. Upload a tattoo image
2. Select your preferred embedding model
3. Get ranked results with similarity scores
4. Optionally analyze detailed patch-level similarities

Perfect for tattoo enthusiasts, artists, and anyone looking for tattoo inspiration!