Datasets:
Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .history/README_20250512195144.md +110 -0
- .history/README_20250513101814.md +109 -0
- .history/README_20250513101828.md +109 -0
- .history/README_20250513101829.md +109 -0
- .history/README_20250513101830.md +109 -0
- .history/README_20250513102004.md +109 -0
- .history/README_20250513102008.md +109 -0
- .history/README_20250513104028.md +109 -0
- .history/README_20250513104031.md +109 -0
- .history/README_20250513104042.md +109 -0
- .history/README_20250513104044.md +109 -0
- .history/README_20250513104103.md +109 -0
- .history/README_20250513104207.md +109 -0
- .history/README_20250513104211.md +109 -0
- .history/README_20250513104216.md +109 -0
- .history/README_20250513104217.md +109 -0
- .history/README_20250513111012.md +108 -0
- .history/README_20250513111014.md +108 -0
- .history/README_20250513111029.md +109 -0
- .history/README_20250513111034.md +109 -0
- .history/README_20250513111035.md +109 -0
- .history/README_20250513111036.md +109 -0
- .history/README_20250513111037.md +109 -0
- .history/README_20250513111045.md +109 -0
- .history/README_20250513111058.md +107 -0
- .history/README_20250513111216.md +158 -0
- .history/README_20250513111230.md +160 -0
- .history/README_20250513112325.md +162 -0
- .history/README_20250513112332.md +162 -0
- .history/README_20250513112337.md +162 -0
- .history/README_20250513112344.md +164 -0
- .history/README_20250513112345.md +164 -0
- .history/README_20250513112416.md +164 -0
- .history/README_20250513112427.md +164 -0
- .history/README_20250513112440.md +164 -0
- .history/README_20250513112502.md +172 -0
- .history/README_20250513112512.md +171 -0
- .history/README_20250513112514.md +170 -0
- .history/README_20250513112523.md +170 -0
- .history/README_20250513112527.md +170 -0
- .history/README_20250513112603.md +165 -0
- .history/README_20250513112723.md +165 -0
- .history/README_20250513112731.md +175 -0
- .history/README_20250513112734.md +175 -0
- .history/README_20250513112743.md +132 -0
- .history/README_20250513112758.md +132 -0
- .history/README_20250513122556.md +129 -0
- .history/README_20250513122636.md +132 -0
- .history/README_20250513122638.md +129 -0
- .history/README_20250513122646.md +133 -0
.history/README_20250512195144.md
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated PD12M image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using SigLIP2. All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{EMPTY_OBJECT}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{EMPTY_OBJECT}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS {table_name}_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
f"CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
f"CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
f'CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
| 110 |
+
|
.history/README_20250513101814.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated PD12M image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using SigLIP2. All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{EMPTY_OBJECT}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{EMPTY_OBJECT}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS {table_name}_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
f"CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
f"CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
f'CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513101828.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated PD12M image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using SigLIP2. All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{EMPTY_OBJECT}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{EMPTY_OBJECT}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
f"CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
f"CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
f'CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513101829.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated PD12M image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using SigLIP2. All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{EMPTY_OBJECT}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{EMPTY_OBJECT}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
f"CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
f"CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
f'CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513101830.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated PD12M image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using SigLIP2. All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{EMPTY_OBJECT}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{EMPTY_OBJECT}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
f"CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
f"CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
f'CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513102004.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated PD12M image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using SigLIP2. All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{EMPTY_OBJECT}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513102008.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated PD12M image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using SigLIP2. All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513104028.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [PD12M image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513104031.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [PD12M](https://huggingface.co/datasets/Spawning/PD12M) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513104042.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [PD12M](https://huggingface.co/datasets/Spawning/PD12M) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513104044.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [PD12M](https://huggingface.co/datasets/Spawning/PD12M) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513104103.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [PD12M](https://huggingface.co/datasets/Spawning/PD12M) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513104207.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [PD12M](https://huggingface.co/datasets/Spawning/PD12M) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513104211.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated Public Domain 12M[PD12M](https://huggingface.co/datasets/Spawning/PD12M) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513104216.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://huggingface.co/datasets/Spawning/PD12M) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513104217.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://huggingface.co/datasets/Spawning/PD12M) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513111012.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 63 |
+
|
| 64 |
+
```sql
|
| 65 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 66 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 68 |
+
...
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 72 |
+
|
| 73 |
+
```sql
|
| 74 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 75 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 77 |
+
...
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
3. Create Indexes
|
| 81 |
+
|
| 82 |
+
```sql
|
| 83 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 84 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 97 |
+
residual_quantization = true
|
| 98 |
+
[build.internal]
|
| 99 |
+
lists = [20000]
|
| 100 |
+
build_threads = 6
|
| 101 |
+
spherical_centroids = false
|
| 102 |
+
$$);
|
| 103 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
## Dataset Structure
|
.history/README_20250513111014.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 63 |
+
|
| 64 |
+
```sql
|
| 65 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 66 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 68 |
+
...
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 72 |
+
|
| 73 |
+
```sql
|
| 74 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 75 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 77 |
+
...
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
3. Create Indexes
|
| 81 |
+
|
| 82 |
+
```sql
|
| 83 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 84 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 97 |
+
residual_quantization = true
|
| 98 |
+
[build.internal]
|
| 99 |
+
lists = [20000]
|
| 100 |
+
build_threads = 6
|
| 101 |
+
spherical_centroids = false
|
| 102 |
+
$$);
|
| 103 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
## Dataset Structure
|
.history/README_20250513111029.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513111034.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513111035.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513111036.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513111037.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513111045.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Dataset Structure
|
.history/README_20250513111058.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Uses
|
| 26 |
+
|
| 27 |
+
This dataset is available for a wide range of applications.
|
| 28 |
+
|
| 29 |
+
### Use with Chipmunk
|
| 30 |
+
|
| 31 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 32 |
+
|
| 33 |
+
### Use directly in PostgreSQL
|
| 34 |
+
|
| 35 |
+
1. Create Table
|
| 36 |
+
|
| 37 |
+
```sql
|
| 38 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 39 |
+
id BIGSERIAL PRIMARY KEY,
|
| 40 |
+
url VARCHAR NOT NULL,
|
| 41 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 42 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 43 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 44 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 45 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 46 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 47 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 48 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 49 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 50 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 51 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 52 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 53 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 54 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 55 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 56 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 57 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 58 |
+
);
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
2. Load csv file to database
|
| 62 |
+
|
| 63 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 64 |
+
|
| 65 |
+
```sql
|
| 66 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 67 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 68 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 69 |
+
...
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 73 |
+
|
| 74 |
+
```sql
|
| 75 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 76 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 77 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 78 |
+
...
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
3. Create Indexes
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 85 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 86 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 98 |
+
residual_quantization = true
|
| 99 |
+
[build.internal]
|
| 100 |
+
lists = [20000]
|
| 101 |
+
build_threads = 6
|
| 102 |
+
spherical_centroids = false
|
| 103 |
+
$$);
|
| 104 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 105 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 107 |
+
```
|
.history/README_20250513111216.md
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
```
|
| 28 |
+
\d is_pd12m;
|
| 29 |
+
Table "public.is_pd12m"
|
| 30 |
+
Column | Type | Collation | Nullable | Default
|
| 31 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 32 |
+
id | bigint | | not null |
|
| 33 |
+
url | character varying | | not null |
|
| 34 |
+
caption | character varying | | not null |
|
| 35 |
+
caption_long | character varying | | not null |
|
| 36 |
+
origin_width | bigint | | not null |
|
| 37 |
+
origin_height | bigint | | not null |
|
| 38 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 39 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 40 |
+
processed_width | bigint | | not null |
|
| 41 |
+
processed_height | bigint | | not null |
|
| 42 |
+
aspect_ratio | double precision | | not null |
|
| 43 |
+
exif | jsonb | | not null |
|
| 44 |
+
meta | jsonb | | not null |
|
| 45 |
+
created_at | timestamp without time zone | | not null |
|
| 46 |
+
updated_at | timestamp without time zone | | not null |
|
| 47 |
+
source | jsonb | | not null |
|
| 48 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 49 |
+
Indexes:
|
| 50 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 51 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 52 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 53 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 54 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 55 |
+
"is_pd12m_exif_index" gin (exif)
|
| 56 |
+
"is_pd12m_meta_index" gin (meta)
|
| 57 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 58 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 59 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 60 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 61 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 62 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 63 |
+
"is_pd12m_source_index" gin (source)
|
| 64 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 65 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 66 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 67 |
+
residual_quantization = true
|
| 68 |
+
[build.internal]
|
| 69 |
+
lists = [20000]
|
| 70 |
+
build_threads = 6
|
| 71 |
+
spherical_centroids = false
|
| 72 |
+
')
|
| 73 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
## Uses
|
| 77 |
+
|
| 78 |
+
This dataset is available for a wide range of applications.
|
| 79 |
+
|
| 80 |
+
### Use with Chipmunk
|
| 81 |
+
|
| 82 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 83 |
+
|
| 84 |
+
### Use directly in PostgreSQL
|
| 85 |
+
|
| 86 |
+
1. Create Table
|
| 87 |
+
|
| 88 |
+
```sql
|
| 89 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 90 |
+
id BIGSERIAL PRIMARY KEY,
|
| 91 |
+
url VARCHAR NOT NULL,
|
| 92 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 93 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 94 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 95 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 97 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 98 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 99 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 100 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 101 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 102 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 103 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 104 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 105 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 106 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 107 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 108 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 109 |
+
);
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
2. Load csv file to database
|
| 113 |
+
|
| 114 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 115 |
+
|
| 116 |
+
```sql
|
| 117 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 118 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 119 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 120 |
+
...
|
| 121 |
+
```
|
| 122 |
+
|
| 123 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 124 |
+
|
| 125 |
+
```sql
|
| 126 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 127 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 128 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 129 |
+
...
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
3. Create Indexes
|
| 133 |
+
|
| 134 |
+
```sql
|
| 135 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 136 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 137 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 138 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 139 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 140 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 141 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 142 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 149 |
+
residual_quantization = true
|
| 150 |
+
[build.internal]
|
| 151 |
+
lists = [20000]
|
| 152 |
+
build_threads = 6
|
| 153 |
+
spherical_centroids = false
|
| 154 |
+
$$);
|
| 155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 158 |
+
```
|
.history/README_20250513111230.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
\d is_pd12m;
|
| 31 |
+
Table "public.is_pd12m"
|
| 32 |
+
Column | Type | Collation | Nullable | Default
|
| 33 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 34 |
+
id | bigint | | not null |
|
| 35 |
+
url | character varying | | not null |
|
| 36 |
+
caption | character varying | | not null |
|
| 37 |
+
caption_long | character varying | | not null |
|
| 38 |
+
origin_width | bigint | | not null |
|
| 39 |
+
origin_height | bigint | | not null |
|
| 40 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 41 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 42 |
+
processed_width | bigint | | not null |
|
| 43 |
+
processed_height | bigint | | not null |
|
| 44 |
+
aspect_ratio | double precision | | not null |
|
| 45 |
+
exif | jsonb | | not null |
|
| 46 |
+
meta | jsonb | | not null |
|
| 47 |
+
created_at | timestamp without time zone | | not null |
|
| 48 |
+
updated_at | timestamp without time zone | | not null |
|
| 49 |
+
source | jsonb | | not null |
|
| 50 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 51 |
+
Indexes:
|
| 52 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 53 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 54 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 55 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 56 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 57 |
+
"is_pd12m_exif_index" gin (exif)
|
| 58 |
+
"is_pd12m_meta_index" gin (meta)
|
| 59 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 60 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 61 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 62 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 63 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 64 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 65 |
+
"is_pd12m_source_index" gin (source)
|
| 66 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 67 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 68 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 69 |
+
residual_quantization = true
|
| 70 |
+
[build.internal]
|
| 71 |
+
lists = [20000]
|
| 72 |
+
build_threads = 6
|
| 73 |
+
spherical_centroids = false
|
| 74 |
+
')
|
| 75 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Uses
|
| 79 |
+
|
| 80 |
+
This dataset is available for a wide range of applications.
|
| 81 |
+
|
| 82 |
+
### Use with Chipmunk
|
| 83 |
+
|
| 84 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 85 |
+
|
| 86 |
+
### Use directly in PostgreSQL
|
| 87 |
+
|
| 88 |
+
1. Create Table
|
| 89 |
+
|
| 90 |
+
```sql
|
| 91 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 92 |
+
id BIGSERIAL PRIMARY KEY,
|
| 93 |
+
url VARCHAR NOT NULL,
|
| 94 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 95 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 97 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 98 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 99 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 100 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 101 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 102 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 103 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 104 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 105 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 106 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 107 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 108 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 109 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 110 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 111 |
+
);
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
2. Load csv file to database
|
| 115 |
+
|
| 116 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 117 |
+
|
| 118 |
+
```sql
|
| 119 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 120 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 121 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 122 |
+
...
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 126 |
+
|
| 127 |
+
```sql
|
| 128 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 129 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 130 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 131 |
+
...
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
3. Create Indexes
|
| 135 |
+
|
| 136 |
+
```sql
|
| 137 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 138 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 139 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 140 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 141 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 142 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 151 |
+
residual_quantization = true
|
| 152 |
+
[build.internal]
|
| 153 |
+
lists = [20000]
|
| 154 |
+
build_threads = 6
|
| 155 |
+
spherical_centroids = false
|
| 156 |
+
$$);
|
| 157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 160 |
+
```
|
.history/README_20250513112325.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
\d is_pd12m;
|
| 31 |
+
Table "public.is_pd12m"
|
| 32 |
+
Column | Type | Collation | Nullable | Default
|
| 33 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 34 |
+
id | bigint | | not null |
|
| 35 |
+
url | character varying | | not null |
|
| 36 |
+
caption | character varying | | not null |
|
| 37 |
+
caption_long | character varying | | not null |
|
| 38 |
+
origin_width | bigint | | not null |
|
| 39 |
+
origin_height | bigint | | not null |
|
| 40 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 41 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 42 |
+
processed_width | bigint | | not null |
|
| 43 |
+
processed_height | bigint | | not null |
|
| 44 |
+
aspect_ratio | double precision | | not null |
|
| 45 |
+
exif | jsonb | | not null |
|
| 46 |
+
meta | jsonb | | not null |
|
| 47 |
+
created_at | timestamp without time zone | | not null |
|
| 48 |
+
updated_at | timestamp without time zone | | not null |
|
| 49 |
+
source | jsonb | | not null |
|
| 50 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 51 |
+
Indexes:
|
| 52 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 53 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 54 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 55 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 56 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 57 |
+
"is_pd12m_exif_index" gin (exif)
|
| 58 |
+
"is_pd12m_meta_index" gin (meta)
|
| 59 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 60 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 61 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 62 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 63 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 64 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 65 |
+
"is_pd12m_source_index" gin (source)
|
| 66 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 67 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 68 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 69 |
+
residual_quantization = true
|
| 70 |
+
[build.internal]
|
| 71 |
+
lists = [20000]
|
| 72 |
+
build_threads = 6
|
| 73 |
+
spherical_centroids = false
|
| 74 |
+
')
|
| 75 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Uses
|
| 79 |
+
|
| 80 |
+
This dataset is available for a wide range of applications.
|
| 81 |
+
|
| 82 |
+
### Use with Chipmunk
|
| 83 |
+
|
| 84 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 85 |
+
|
| 86 |
+
### Use directly in PostgreSQL
|
| 87 |
+
|
| 88 |
+
1. Create Table
|
| 89 |
+
|
| 90 |
+
```sql
|
| 91 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 92 |
+
id BIGSERIAL PRIMARY KEY,
|
| 93 |
+
url VARCHAR NOT NULL,
|
| 94 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 95 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 97 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 98 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 99 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 100 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 101 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 102 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 103 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 104 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 105 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 106 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 107 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 108 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 109 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 110 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 111 |
+
);
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
2. Load csv file to database
|
| 115 |
+
|
| 116 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 117 |
+
|
| 118 |
+
```sql
|
| 119 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 120 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 121 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 122 |
+
...
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 126 |
+
|
| 127 |
+
```sql
|
| 128 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 129 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 130 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 131 |
+
...
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
3. Create Indexes
|
| 135 |
+
|
| 136 |
+
You
|
| 137 |
+
|
| 138 |
+
```sql
|
| 139 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 140 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 141 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 142 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 153 |
+
residual_quantization = true
|
| 154 |
+
[build.internal]
|
| 155 |
+
lists = [20000]
|
| 156 |
+
build_threads = 6
|
| 157 |
+
spherical_centroids = false
|
| 158 |
+
$$);
|
| 159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 162 |
+
```
|
.history/README_20250513112332.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
\d is_pd12m;
|
| 31 |
+
Table "public.is_pd12m"
|
| 32 |
+
Column | Type | Collation | Nullable | Default
|
| 33 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 34 |
+
id | bigint | | not null |
|
| 35 |
+
url | character varying | | not null |
|
| 36 |
+
caption | character varying | | not null |
|
| 37 |
+
caption_long | character varying | | not null |
|
| 38 |
+
origin_width | bigint | | not null |
|
| 39 |
+
origin_height | bigint | | not null |
|
| 40 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 41 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 42 |
+
processed_width | bigint | | not null |
|
| 43 |
+
processed_height | bigint | | not null |
|
| 44 |
+
aspect_ratio | double precision | | not null |
|
| 45 |
+
exif | jsonb | | not null |
|
| 46 |
+
meta | jsonb | | not null |
|
| 47 |
+
created_at | timestamp without time zone | | not null |
|
| 48 |
+
updated_at | timestamp without time zone | | not null |
|
| 49 |
+
source | jsonb | | not null |
|
| 50 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 51 |
+
Indexes:
|
| 52 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 53 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 54 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 55 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 56 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 57 |
+
"is_pd12m_exif_index" gin (exif)
|
| 58 |
+
"is_pd12m_meta_index" gin (meta)
|
| 59 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 60 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 61 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 62 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 63 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 64 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 65 |
+
"is_pd12m_source_index" gin (source)
|
| 66 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 67 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 68 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 69 |
+
residual_quantization = true
|
| 70 |
+
[build.internal]
|
| 71 |
+
lists = [20000]
|
| 72 |
+
build_threads = 6
|
| 73 |
+
spherical_centroids = false
|
| 74 |
+
')
|
| 75 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Uses
|
| 79 |
+
|
| 80 |
+
This dataset is available for a wide range of applications.
|
| 81 |
+
|
| 82 |
+
### Use with Chipmunk
|
| 83 |
+
|
| 84 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 85 |
+
|
| 86 |
+
### Use directly in PostgreSQL
|
| 87 |
+
|
| 88 |
+
1. Create Table
|
| 89 |
+
|
| 90 |
+
```sql
|
| 91 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 92 |
+
id BIGSERIAL PRIMARY KEY,
|
| 93 |
+
url VARCHAR NOT NULL,
|
| 94 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 95 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 97 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 98 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 99 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 100 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 101 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 102 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 103 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 104 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 105 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 106 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 107 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 108 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 109 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 110 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 111 |
+
);
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
2. Load csv file to database
|
| 115 |
+
|
| 116 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 117 |
+
|
| 118 |
+
```sql
|
| 119 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 120 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 121 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 122 |
+
...
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 126 |
+
|
| 127 |
+
```sql
|
| 128 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 129 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 130 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 131 |
+
...
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
3. Create Indexes
|
| 135 |
+
|
| 136 |
+
You need
|
| 137 |
+
|
| 138 |
+
```sql
|
| 139 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 140 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 141 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 142 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 153 |
+
residual_quantization = true
|
| 154 |
+
[build.internal]
|
| 155 |
+
lists = [20000]
|
| 156 |
+
build_threads = 6
|
| 157 |
+
spherical_centroids = false
|
| 158 |
+
$$);
|
| 159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 162 |
+
```
|
.history/README_20250513112337.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
\d is_pd12m;
|
| 31 |
+
Table "public.is_pd12m"
|
| 32 |
+
Column | Type | Collation | Nullable | Default
|
| 33 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 34 |
+
id | bigint | | not null |
|
| 35 |
+
url | character varying | | not null |
|
| 36 |
+
caption | character varying | | not null |
|
| 37 |
+
caption_long | character varying | | not null |
|
| 38 |
+
origin_width | bigint | | not null |
|
| 39 |
+
origin_height | bigint | | not null |
|
| 40 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 41 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 42 |
+
processed_width | bigint | | not null |
|
| 43 |
+
processed_height | bigint | | not null |
|
| 44 |
+
aspect_ratio | double precision | | not null |
|
| 45 |
+
exif | jsonb | | not null |
|
| 46 |
+
meta | jsonb | | not null |
|
| 47 |
+
created_at | timestamp without time zone | | not null |
|
| 48 |
+
updated_at | timestamp without time zone | | not null |
|
| 49 |
+
source | jsonb | | not null |
|
| 50 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 51 |
+
Indexes:
|
| 52 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 53 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 54 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 55 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 56 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 57 |
+
"is_pd12m_exif_index" gin (exif)
|
| 58 |
+
"is_pd12m_meta_index" gin (meta)
|
| 59 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 60 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 61 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 62 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 63 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 64 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 65 |
+
"is_pd12m_source_index" gin (source)
|
| 66 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 67 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 68 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 69 |
+
residual_quantization = true
|
| 70 |
+
[build.internal]
|
| 71 |
+
lists = [20000]
|
| 72 |
+
build_threads = 6
|
| 73 |
+
spherical_centroids = false
|
| 74 |
+
')
|
| 75 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Uses
|
| 79 |
+
|
| 80 |
+
This dataset is available for a wide range of applications.
|
| 81 |
+
|
| 82 |
+
### Use with Chipmunk
|
| 83 |
+
|
| 84 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 85 |
+
|
| 86 |
+
### Use directly in PostgreSQL
|
| 87 |
+
|
| 88 |
+
1. Create Table
|
| 89 |
+
|
| 90 |
+
```sql
|
| 91 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 92 |
+
id BIGSERIAL PRIMARY KEY,
|
| 93 |
+
url VARCHAR NOT NULL,
|
| 94 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 95 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 97 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 98 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 99 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 100 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 101 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 102 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 103 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 104 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 105 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 106 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 107 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 108 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 109 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 110 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 111 |
+
);
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
2. Load csv file to database
|
| 115 |
+
|
| 116 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 117 |
+
|
| 118 |
+
```sql
|
| 119 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 120 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 121 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 122 |
+
...
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 126 |
+
|
| 127 |
+
```sql
|
| 128 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 129 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 130 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 131 |
+
...
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
3. Create Indexes
|
| 135 |
+
|
| 136 |
+
You need to create the following indexes
|
| 137 |
+
|
| 138 |
+
```sql
|
| 139 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 140 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 141 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 142 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 153 |
+
residual_quantization = true
|
| 154 |
+
[build.internal]
|
| 155 |
+
lists = [20000]
|
| 156 |
+
build_threads = 6
|
| 157 |
+
spherical_centroids = false
|
| 158 |
+
$$);
|
| 159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 162 |
+
```
|
.history/README_20250513112344.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
\d is_pd12m;
|
| 31 |
+
Table "public.is_pd12m"
|
| 32 |
+
Column | Type | Collation | Nullable | Default
|
| 33 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 34 |
+
id | bigint | | not null |
|
| 35 |
+
url | character varying | | not null |
|
| 36 |
+
caption | character varying | | not null |
|
| 37 |
+
caption_long | character varying | | not null |
|
| 38 |
+
origin_width | bigint | | not null |
|
| 39 |
+
origin_height | bigint | | not null |
|
| 40 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 41 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 42 |
+
processed_width | bigint | | not null |
|
| 43 |
+
processed_height | bigint | | not null |
|
| 44 |
+
aspect_ratio | double precision | | not null |
|
| 45 |
+
exif | jsonb | | not null |
|
| 46 |
+
meta | jsonb | | not null |
|
| 47 |
+
created_at | timestamp without time zone | | not null |
|
| 48 |
+
updated_at | timestamp without time zone | | not null |
|
| 49 |
+
source | jsonb | | not null |
|
| 50 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 51 |
+
Indexes:
|
| 52 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 53 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 54 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 55 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 56 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 57 |
+
"is_pd12m_exif_index" gin (exif)
|
| 58 |
+
"is_pd12m_meta_index" gin (meta)
|
| 59 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 60 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 61 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 62 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 63 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 64 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 65 |
+
"is_pd12m_source_index" gin (source)
|
| 66 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 67 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 68 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 69 |
+
residual_quantization = true
|
| 70 |
+
[build.internal]
|
| 71 |
+
lists = [20000]
|
| 72 |
+
build_threads = 6
|
| 73 |
+
spherical_centroids = false
|
| 74 |
+
')
|
| 75 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Uses
|
| 79 |
+
|
| 80 |
+
This dataset is available for a wide range of applications.
|
| 81 |
+
|
| 82 |
+
### Use with Chipmunk
|
| 83 |
+
|
| 84 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 85 |
+
|
| 86 |
+
### Use directly in PostgreSQL
|
| 87 |
+
|
| 88 |
+
1. Create Table
|
| 89 |
+
|
| 90 |
+
```sql
|
| 91 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 92 |
+
id BIGSERIAL PRIMARY KEY,
|
| 93 |
+
url VARCHAR NOT NULL,
|
| 94 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 95 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 97 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 98 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 99 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 100 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 101 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 102 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 103 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 104 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 105 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 106 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 107 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 108 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 109 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 110 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 111 |
+
);
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
2. Load csv file to database
|
| 115 |
+
|
| 116 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 117 |
+
|
| 118 |
+
```sql
|
| 119 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 120 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 121 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 122 |
+
...
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 126 |
+
|
| 127 |
+
```sql
|
| 128 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 129 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 130 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 131 |
+
...
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
3. Create Indexes
|
| 135 |
+
|
| 136 |
+
You need to create the following indexes for the best performance.
|
| 137 |
+
|
| 138 |
+
The
|
| 139 |
+
|
| 140 |
+
```sql
|
| 141 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 142 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 155 |
+
residual_quantization = true
|
| 156 |
+
[build.internal]
|
| 157 |
+
lists = [20000]
|
| 158 |
+
build_threads = 6
|
| 159 |
+
spherical_centroids = false
|
| 160 |
+
$$);
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 163 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 164 |
+
```
|
.history/README_20250513112345.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
\d is_pd12m;
|
| 31 |
+
Table "public.is_pd12m"
|
| 32 |
+
Column | Type | Collation | Nullable | Default
|
| 33 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 34 |
+
id | bigint | | not null |
|
| 35 |
+
url | character varying | | not null |
|
| 36 |
+
caption | character varying | | not null |
|
| 37 |
+
caption_long | character varying | | not null |
|
| 38 |
+
origin_width | bigint | | not null |
|
| 39 |
+
origin_height | bigint | | not null |
|
| 40 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 41 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 42 |
+
processed_width | bigint | | not null |
|
| 43 |
+
processed_height | bigint | | not null |
|
| 44 |
+
aspect_ratio | double precision | | not null |
|
| 45 |
+
exif | jsonb | | not null |
|
| 46 |
+
meta | jsonb | | not null |
|
| 47 |
+
created_at | timestamp without time zone | | not null |
|
| 48 |
+
updated_at | timestamp without time zone | | not null |
|
| 49 |
+
source | jsonb | | not null |
|
| 50 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 51 |
+
Indexes:
|
| 52 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 53 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 54 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 55 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 56 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 57 |
+
"is_pd12m_exif_index" gin (exif)
|
| 58 |
+
"is_pd12m_meta_index" gin (meta)
|
| 59 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 60 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 61 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 62 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 63 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 64 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 65 |
+
"is_pd12m_source_index" gin (source)
|
| 66 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 67 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 68 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 69 |
+
residual_quantization = true
|
| 70 |
+
[build.internal]
|
| 71 |
+
lists = [20000]
|
| 72 |
+
build_threads = 6
|
| 73 |
+
spherical_centroids = false
|
| 74 |
+
')
|
| 75 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Uses
|
| 79 |
+
|
| 80 |
+
This dataset is available for a wide range of applications.
|
| 81 |
+
|
| 82 |
+
### Use with Chipmunk
|
| 83 |
+
|
| 84 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 85 |
+
|
| 86 |
+
### Use directly in PostgreSQL
|
| 87 |
+
|
| 88 |
+
1. Create Table
|
| 89 |
+
|
| 90 |
+
```sql
|
| 91 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 92 |
+
id BIGSERIAL PRIMARY KEY,
|
| 93 |
+
url VARCHAR NOT NULL,
|
| 94 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 95 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 97 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 98 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 99 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 100 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 101 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 102 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 103 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 104 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 105 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 106 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 107 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 108 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 109 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 110 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 111 |
+
);
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
2. Load csv file to database
|
| 115 |
+
|
| 116 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 117 |
+
|
| 118 |
+
```sql
|
| 119 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 120 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 121 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 122 |
+
...
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 126 |
+
|
| 127 |
+
```sql
|
| 128 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 129 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 130 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 131 |
+
...
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
3. Create Indexes
|
| 135 |
+
|
| 136 |
+
You need to create the following indexes for the best performance.
|
| 137 |
+
|
| 138 |
+
The
|
| 139 |
+
|
| 140 |
+
```sql
|
| 141 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 142 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 155 |
+
residual_quantization = true
|
| 156 |
+
[build.internal]
|
| 157 |
+
lists = [20000]
|
| 158 |
+
build_threads = 6
|
| 159 |
+
spherical_centroids = false
|
| 160 |
+
$$);
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 163 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 164 |
+
```
|
.history/README_20250513112416.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
\d is_pd12m;
|
| 31 |
+
Table "public.is_pd12m"
|
| 32 |
+
Column | Type | Collation | Nullable | Default
|
| 33 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 34 |
+
id | bigint | | not null |
|
| 35 |
+
url | character varying | | not null |
|
| 36 |
+
caption | character varying | | not null |
|
| 37 |
+
caption_long | character varying | | not null |
|
| 38 |
+
origin_width | bigint | | not null |
|
| 39 |
+
origin_height | bigint | | not null |
|
| 40 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 41 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 42 |
+
processed_width | bigint | | not null |
|
| 43 |
+
processed_height | bigint | | not null |
|
| 44 |
+
aspect_ratio | double precision | | not null |
|
| 45 |
+
exif | jsonb | | not null |
|
| 46 |
+
meta | jsonb | | not null |
|
| 47 |
+
created_at | timestamp without time zone | | not null |
|
| 48 |
+
updated_at | timestamp without time zone | | not null |
|
| 49 |
+
source | jsonb | | not null |
|
| 50 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 51 |
+
Indexes:
|
| 52 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 53 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 54 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 55 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 56 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 57 |
+
"is_pd12m_exif_index" gin (exif)
|
| 58 |
+
"is_pd12m_meta_index" gin (meta)
|
| 59 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 60 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 61 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 62 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 63 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 64 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 65 |
+
"is_pd12m_source_index" gin (source)
|
| 66 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 67 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 68 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 69 |
+
residual_quantization = true
|
| 70 |
+
[build.internal]
|
| 71 |
+
lists = [20000]
|
| 72 |
+
build_threads = 6
|
| 73 |
+
spherical_centroids = false
|
| 74 |
+
')
|
| 75 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Uses
|
| 79 |
+
|
| 80 |
+
This dataset is available for a wide range of applications.
|
| 81 |
+
|
| 82 |
+
### Use with Chipmunk
|
| 83 |
+
|
| 84 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 85 |
+
|
| 86 |
+
### Use directly in PostgreSQL
|
| 87 |
+
|
| 88 |
+
1. Create Table
|
| 89 |
+
|
| 90 |
+
```sql
|
| 91 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 92 |
+
id BIGSERIAL PRIMARY KEY,
|
| 93 |
+
url VARCHAR NOT NULL,
|
| 94 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 95 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 97 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 98 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 99 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 100 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 101 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 102 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 103 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 104 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 105 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 106 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 107 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 108 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 109 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 110 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 111 |
+
);
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
2. Load csv file to database
|
| 115 |
+
|
| 116 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 117 |
+
|
| 118 |
+
```sql
|
| 119 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 120 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 121 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 122 |
+
...
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 126 |
+
|
| 127 |
+
```sql
|
| 128 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 129 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 130 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 131 |
+
...
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
3. Create Indexes
|
| 135 |
+
|
| 136 |
+
You need to create the following indexes for the best performance.
|
| 137 |
+
|
| 138 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from
|
| 139 |
+
|
| 140 |
+
```sql
|
| 141 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 142 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 155 |
+
residual_quantization = true
|
| 156 |
+
[build.internal]
|
| 157 |
+
lists = [20000]
|
| 158 |
+
build_threads = 6
|
| 159 |
+
spherical_centroids = false
|
| 160 |
+
$$);
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 163 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 164 |
+
```
|
.history/README_20250513112427.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
\d is_pd12m;
|
| 31 |
+
Table "public.is_pd12m"
|
| 32 |
+
Column | Type | Collation | Nullable | Default
|
| 33 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 34 |
+
id | bigint | | not null |
|
| 35 |
+
url | character varying | | not null |
|
| 36 |
+
caption | character varying | | not null |
|
| 37 |
+
caption_long | character varying | | not null |
|
| 38 |
+
origin_width | bigint | | not null |
|
| 39 |
+
origin_height | bigint | | not null |
|
| 40 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 41 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 42 |
+
processed_width | bigint | | not null |
|
| 43 |
+
processed_height | bigint | | not null |
|
| 44 |
+
aspect_ratio | double precision | | not null |
|
| 45 |
+
exif | jsonb | | not null |
|
| 46 |
+
meta | jsonb | | not null |
|
| 47 |
+
created_at | timestamp without time zone | | not null |
|
| 48 |
+
updated_at | timestamp without time zone | | not null |
|
| 49 |
+
source | jsonb | | not null |
|
| 50 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 51 |
+
Indexes:
|
| 52 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 53 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 54 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 55 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 56 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 57 |
+
"is_pd12m_exif_index" gin (exif)
|
| 58 |
+
"is_pd12m_meta_index" gin (meta)
|
| 59 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 60 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 61 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 62 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 63 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 64 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 65 |
+
"is_pd12m_source_index" gin (source)
|
| 66 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 67 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 68 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 69 |
+
residual_quantization = true
|
| 70 |
+
[build.internal]
|
| 71 |
+
lists = [20000]
|
| 72 |
+
build_threads = 6
|
| 73 |
+
spherical_centroids = false
|
| 74 |
+
')
|
| 75 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Uses
|
| 79 |
+
|
| 80 |
+
This dataset is available for a wide range of applications.
|
| 81 |
+
|
| 82 |
+
### Use with Chipmunk
|
| 83 |
+
|
| 84 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 85 |
+
|
| 86 |
+
### Use directly in PostgreSQL
|
| 87 |
+
|
| 88 |
+
1. Create Table
|
| 89 |
+
|
| 90 |
+
```sql
|
| 91 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 92 |
+
id BIGSERIAL PRIMARY KEY,
|
| 93 |
+
url VARCHAR NOT NULL,
|
| 94 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 95 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 97 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 98 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 99 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 100 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 101 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 102 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 103 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 104 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 105 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 106 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 107 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 108 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 109 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 110 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 111 |
+
);
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
2. Load csv file to database
|
| 115 |
+
|
| 116 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 117 |
+
|
| 118 |
+
```sql
|
| 119 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 120 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 121 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 122 |
+
...
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 126 |
+
|
| 127 |
+
```sql
|
| 128 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 129 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 130 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 131 |
+
...
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
3. Create Indexes
|
| 135 |
+
|
| 136 |
+
You need to create the following indexes for the best performance.
|
| 137 |
+
|
| 138 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the ve
|
| 139 |
+
|
| 140 |
+
```sql
|
| 141 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 142 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 155 |
+
residual_quantization = true
|
| 156 |
+
[build.internal]
|
| 157 |
+
lists = [20000]
|
| 158 |
+
build_threads = 6
|
| 159 |
+
spherical_centroids = false
|
| 160 |
+
$$);
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 163 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 164 |
+
```
|
.history/README_20250513112440.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
\d is_pd12m;
|
| 31 |
+
Table "public.is_pd12m"
|
| 32 |
+
Column | Type | Collation | Nullable | Default
|
| 33 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 34 |
+
id | bigint | | not null |
|
| 35 |
+
url | character varying | | not null |
|
| 36 |
+
caption | character varying | | not null |
|
| 37 |
+
caption_long | character varying | | not null |
|
| 38 |
+
origin_width | bigint | | not null |
|
| 39 |
+
origin_height | bigint | | not null |
|
| 40 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 41 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 42 |
+
processed_width | bigint | | not null |
|
| 43 |
+
processed_height | bigint | | not null |
|
| 44 |
+
aspect_ratio | double precision | | not null |
|
| 45 |
+
exif | jsonb | | not null |
|
| 46 |
+
meta | jsonb | | not null |
|
| 47 |
+
created_at | timestamp without time zone | | not null |
|
| 48 |
+
updated_at | timestamp without time zone | | not null |
|
| 49 |
+
source | jsonb | | not null |
|
| 50 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 51 |
+
Indexes:
|
| 52 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 53 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 54 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 55 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 56 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 57 |
+
"is_pd12m_exif_index" gin (exif)
|
| 58 |
+
"is_pd12m_meta_index" gin (meta)
|
| 59 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 60 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 61 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 62 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 63 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 64 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 65 |
+
"is_pd12m_source_index" gin (source)
|
| 66 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 67 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 68 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 69 |
+
residual_quantization = true
|
| 70 |
+
[build.internal]
|
| 71 |
+
lists = [20000]
|
| 72 |
+
build_threads = 6
|
| 73 |
+
spherical_centroids = false
|
| 74 |
+
')
|
| 75 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Uses
|
| 79 |
+
|
| 80 |
+
This dataset is available for a wide range of applications.
|
| 81 |
+
|
| 82 |
+
### Use with Chipmunk
|
| 83 |
+
|
| 84 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 85 |
+
|
| 86 |
+
### Use directly in PostgreSQL
|
| 87 |
+
|
| 88 |
+
1. Create Table
|
| 89 |
+
|
| 90 |
+
```sql
|
| 91 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 92 |
+
id BIGSERIAL PRIMARY KEY,
|
| 93 |
+
url VARCHAR NOT NULL,
|
| 94 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 95 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 97 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 98 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 99 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 100 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 101 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 102 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 103 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 104 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 105 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 106 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 107 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 108 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 109 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 110 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 111 |
+
);
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
2. Load csv file to database
|
| 115 |
+
|
| 116 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 117 |
+
|
| 118 |
+
```sql
|
| 119 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 120 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 121 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 122 |
+
...
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 126 |
+
|
| 127 |
+
```sql
|
| 128 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 129 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 130 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 131 |
+
...
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
3. Create Indexes
|
| 135 |
+
|
| 136 |
+
You need to create the following indexes for the best performance.
|
| 137 |
+
|
| 138 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 139 |
+
|
| 140 |
+
```sql
|
| 141 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 142 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 155 |
+
residual_quantization = true
|
| 156 |
+
[build.internal]
|
| 157 |
+
lists = [20000]
|
| 158 |
+
build_threads = 6
|
| 159 |
+
spherical_centroids = false
|
| 160 |
+
$$);
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 163 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 164 |
+
```
|
.history/README_20250513112502.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- width: The width of the image in pixels.
|
| 31 |
+
- height: The height of the image in pixels.
|
| 32 |
+
- mime_type: The MIME type of the image file.
|
| 33 |
+
- hash: The MD5 hash of the image file.
|
| 34 |
+
- license: The URL of the image license.
|
| 35 |
+
- source : The source organization of the image.
|
| 36 |
+
|
| 37 |
+
```
|
| 38 |
+
\d is_pd12m;
|
| 39 |
+
Table "public.is_pd12m"
|
| 40 |
+
Column | Type | Collation | Nullable | Default
|
| 41 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 42 |
+
id | bigint | | not null |
|
| 43 |
+
url | character varying | | not null |
|
| 44 |
+
caption | character varying | | not null |
|
| 45 |
+
caption_long | character varying | | not null |
|
| 46 |
+
origin_width | bigint | | not null |
|
| 47 |
+
origin_height | bigint | | not null |
|
| 48 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 49 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 50 |
+
processed_width | bigint | | not null |
|
| 51 |
+
processed_height | bigint | | not null |
|
| 52 |
+
aspect_ratio | double precision | | not null |
|
| 53 |
+
exif | jsonb | | not null |
|
| 54 |
+
meta | jsonb | | not null |
|
| 55 |
+
created_at | timestamp without time zone | | not null |
|
| 56 |
+
updated_at | timestamp without time zone | | not null |
|
| 57 |
+
source | jsonb | | not null |
|
| 58 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 59 |
+
Indexes:
|
| 60 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 61 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 62 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 63 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 64 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 65 |
+
"is_pd12m_exif_index" gin (exif)
|
| 66 |
+
"is_pd12m_meta_index" gin (meta)
|
| 67 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 68 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 69 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 70 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 71 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 72 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 73 |
+
"is_pd12m_source_index" gin (source)
|
| 74 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 75 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 76 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 77 |
+
residual_quantization = true
|
| 78 |
+
[build.internal]
|
| 79 |
+
lists = [20000]
|
| 80 |
+
build_threads = 6
|
| 81 |
+
spherical_centroids = false
|
| 82 |
+
')
|
| 83 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## Uses
|
| 87 |
+
|
| 88 |
+
This dataset is available for a wide range of applications.
|
| 89 |
+
|
| 90 |
+
### Use with Chipmunk
|
| 91 |
+
|
| 92 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 93 |
+
|
| 94 |
+
### Use directly in PostgreSQL
|
| 95 |
+
|
| 96 |
+
1. Create Table
|
| 97 |
+
|
| 98 |
+
```sql
|
| 99 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 100 |
+
id BIGSERIAL PRIMARY KEY,
|
| 101 |
+
url VARCHAR NOT NULL,
|
| 102 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 103 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 104 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 105 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 106 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 107 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 108 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 109 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 110 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 111 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 112 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 113 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 114 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 115 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 116 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 117 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 118 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 119 |
+
);
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
2. Load csv file to database
|
| 123 |
+
|
| 124 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 125 |
+
|
| 126 |
+
```sql
|
| 127 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 128 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 129 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 130 |
+
...
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 134 |
+
|
| 135 |
+
```sql
|
| 136 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 137 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 138 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 139 |
+
...
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
3. Create Indexes
|
| 143 |
+
|
| 144 |
+
You need to create the following indexes for the best performance.
|
| 145 |
+
|
| 146 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 147 |
+
|
| 148 |
+
```sql
|
| 149 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 163 |
+
residual_quantization = true
|
| 164 |
+
[build.internal]
|
| 165 |
+
lists = [20000]
|
| 166 |
+
build_threads = 6
|
| 167 |
+
spherical_centroids = false
|
| 168 |
+
$$);
|
| 169 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 170 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 171 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 172 |
+
```
|
.history/README_20250513112512.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- width: The width of the image in pixels.
|
| 31 |
+
- height: The height of the image in pixels.
|
| 32 |
+
- mime_type: The MIME type of the image file.
|
| 33 |
+
- hash: The MD5 hash of the image file.
|
| 34 |
+
- license: The URL of the image license.
|
| 35 |
+
- source : The source organization of the image.
|
| 36 |
+
|
| 37 |
+
```
|
| 38 |
+
\d is_pd12m;
|
| 39 |
+
Table "public.is_pd12m"
|
| 40 |
+
Column | Type | Collation | Nullable | Default
|
| 41 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 42 |
+
url | character varying | | not null |
|
| 43 |
+
caption | character varying | | not null |
|
| 44 |
+
caption_long | character varying | | not null |
|
| 45 |
+
origin_width | bigint | | not null |
|
| 46 |
+
origin_height | bigint | | not null |
|
| 47 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 48 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 49 |
+
processed_width | bigint | | not null |
|
| 50 |
+
processed_height | bigint | | not null |
|
| 51 |
+
aspect_ratio | double precision | | not null |
|
| 52 |
+
exif | jsonb | | not null |
|
| 53 |
+
meta | jsonb | | not null |
|
| 54 |
+
created_at | timestamp without time zone | | not null |
|
| 55 |
+
updated_at | timestamp without time zone | | not null |
|
| 56 |
+
source | jsonb | | not null |
|
| 57 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 58 |
+
Indexes:
|
| 59 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 60 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 61 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 62 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 63 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 64 |
+
"is_pd12m_exif_index" gin (exif)
|
| 65 |
+
"is_pd12m_meta_index" gin (meta)
|
| 66 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 67 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 68 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 69 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 70 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 71 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 72 |
+
"is_pd12m_source_index" gin (source)
|
| 73 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 74 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 75 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 76 |
+
residual_quantization = true
|
| 77 |
+
[build.internal]
|
| 78 |
+
lists = [20000]
|
| 79 |
+
build_threads = 6
|
| 80 |
+
spherical_centroids = false
|
| 81 |
+
')
|
| 82 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
## Uses
|
| 86 |
+
|
| 87 |
+
This dataset is available for a wide range of applications.
|
| 88 |
+
|
| 89 |
+
### Use with Chipmunk
|
| 90 |
+
|
| 91 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 92 |
+
|
| 93 |
+
### Use directly in PostgreSQL
|
| 94 |
+
|
| 95 |
+
1. Create Table
|
| 96 |
+
|
| 97 |
+
```sql
|
| 98 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 99 |
+
id BIGSERIAL PRIMARY KEY,
|
| 100 |
+
url VARCHAR NOT NULL,
|
| 101 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 102 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 103 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 104 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 105 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 106 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 107 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 108 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 109 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 110 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 111 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 112 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 113 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 114 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 115 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 116 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 117 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 118 |
+
);
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
2. Load csv file to database
|
| 122 |
+
|
| 123 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 124 |
+
|
| 125 |
+
```sql
|
| 126 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 127 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 128 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 129 |
+
...
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 133 |
+
|
| 134 |
+
```sql
|
| 135 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 136 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 137 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 138 |
+
...
|
| 139 |
+
```
|
| 140 |
+
|
| 141 |
+
3. Create Indexes
|
| 142 |
+
|
| 143 |
+
You need to create the following indexes for the best performance.
|
| 144 |
+
|
| 145 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 146 |
+
|
| 147 |
+
```sql
|
| 148 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 162 |
+
residual_quantization = true
|
| 163 |
+
[build.internal]
|
| 164 |
+
lists = [20000]
|
| 165 |
+
build_threads = 6
|
| 166 |
+
spherical_centroids = false
|
| 167 |
+
$$);
|
| 168 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 169 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 170 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 171 |
+
```
|
.history/README_20250513112514.md
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- width: The width of the image in pixels.
|
| 31 |
+
- height: The height of the image in pixels.
|
| 32 |
+
- mime_type: The MIME type of the image file.
|
| 33 |
+
- hash: The MD5 hash of the image file.
|
| 34 |
+
- license: The URL of the image license.
|
| 35 |
+
- source : The source organization of the image.
|
| 36 |
+
|
| 37 |
+
```
|
| 38 |
+
\d is_pd12m;
|
| 39 |
+
Table "public.is_pd12m"
|
| 40 |
+
Column | Type | Collation | Nullable | Default
|
| 41 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 42 |
+
caption | character varying | | not null |
|
| 43 |
+
caption_long | character varying | | not null |
|
| 44 |
+
origin_width | bigint | | not null |
|
| 45 |
+
origin_height | bigint | | not null |
|
| 46 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 47 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 48 |
+
processed_width | bigint | | not null |
|
| 49 |
+
processed_height | bigint | | not null |
|
| 50 |
+
aspect_ratio | double precision | | not null |
|
| 51 |
+
exif | jsonb | | not null |
|
| 52 |
+
meta | jsonb | | not null |
|
| 53 |
+
created_at | timestamp without time zone | | not null |
|
| 54 |
+
updated_at | timestamp without time zone | | not null |
|
| 55 |
+
source | jsonb | | not null |
|
| 56 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 57 |
+
Indexes:
|
| 58 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 59 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 60 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 61 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 62 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 63 |
+
"is_pd12m_exif_index" gin (exif)
|
| 64 |
+
"is_pd12m_meta_index" gin (meta)
|
| 65 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 66 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 67 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 68 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 69 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 70 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 71 |
+
"is_pd12m_source_index" gin (source)
|
| 72 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 73 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 74 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 75 |
+
residual_quantization = true
|
| 76 |
+
[build.internal]
|
| 77 |
+
lists = [20000]
|
| 78 |
+
build_threads = 6
|
| 79 |
+
spherical_centroids = false
|
| 80 |
+
')
|
| 81 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
## Uses
|
| 85 |
+
|
| 86 |
+
This dataset is available for a wide range of applications.
|
| 87 |
+
|
| 88 |
+
### Use with Chipmunk
|
| 89 |
+
|
| 90 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 91 |
+
|
| 92 |
+
### Use directly in PostgreSQL
|
| 93 |
+
|
| 94 |
+
1. Create Table
|
| 95 |
+
|
| 96 |
+
```sql
|
| 97 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 98 |
+
id BIGSERIAL PRIMARY KEY,
|
| 99 |
+
url VARCHAR NOT NULL,
|
| 100 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 101 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 102 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 103 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 104 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 105 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 106 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 107 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 108 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 109 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 110 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 111 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 112 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 113 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 114 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 115 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 116 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 117 |
+
);
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
2. Load csv file to database
|
| 121 |
+
|
| 122 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 123 |
+
|
| 124 |
+
```sql
|
| 125 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 126 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 127 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 128 |
+
...
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 132 |
+
|
| 133 |
+
```sql
|
| 134 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 135 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 136 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 137 |
+
...
|
| 138 |
+
```
|
| 139 |
+
|
| 140 |
+
3. Create Indexes
|
| 141 |
+
|
| 142 |
+
You need to create the following indexes for the best performance.
|
| 143 |
+
|
| 144 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 145 |
+
|
| 146 |
+
```sql
|
| 147 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 161 |
+
residual_quantization = true
|
| 162 |
+
[build.internal]
|
| 163 |
+
lists = [20000]
|
| 164 |
+
build_threads = 6
|
| 165 |
+
spherical_centroids = false
|
| 166 |
+
$$);
|
| 167 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 168 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 169 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 170 |
+
```
|
.history/README_20250513112523.md
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image .
|
| 31 |
+
- width: The width of the image in pixels.
|
| 32 |
+
- height: The height of the image in pixels.
|
| 33 |
+
- mime_type: The MIME type of the image file.
|
| 34 |
+
- hash: The MD5 hash of the image file.
|
| 35 |
+
- license: The URL of the image license.
|
| 36 |
+
- source : The source organization of the image.
|
| 37 |
+
|
| 38 |
+
```
|
| 39 |
+
\d is_pd12m;
|
| 40 |
+
Table "public.is_pd12m"
|
| 41 |
+
Column | Type | Collation | Nullable | Default
|
| 42 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 43 |
+
caption_long | character varying | | not null |
|
| 44 |
+
origin_width | bigint | | not null |
|
| 45 |
+
origin_height | bigint | | not null |
|
| 46 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 47 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 48 |
+
processed_width | bigint | | not null |
|
| 49 |
+
processed_height | bigint | | not null |
|
| 50 |
+
aspect_ratio | double precision | | not null |
|
| 51 |
+
exif | jsonb | | not null |
|
| 52 |
+
meta | jsonb | | not null |
|
| 53 |
+
created_at | timestamp without time zone | | not null |
|
| 54 |
+
updated_at | timestamp without time zone | | not null |
|
| 55 |
+
source | jsonb | | not null |
|
| 56 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 57 |
+
Indexes:
|
| 58 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 59 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 60 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 61 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 62 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 63 |
+
"is_pd12m_exif_index" gin (exif)
|
| 64 |
+
"is_pd12m_meta_index" gin (meta)
|
| 65 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 66 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 67 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 68 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 69 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 70 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 71 |
+
"is_pd12m_source_index" gin (source)
|
| 72 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 73 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 74 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 75 |
+
residual_quantization = true
|
| 76 |
+
[build.internal]
|
| 77 |
+
lists = [20000]
|
| 78 |
+
build_threads = 6
|
| 79 |
+
spherical_centroids = false
|
| 80 |
+
')
|
| 81 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
## Uses
|
| 85 |
+
|
| 86 |
+
This dataset is available for a wide range of applications.
|
| 87 |
+
|
| 88 |
+
### Use with Chipmunk
|
| 89 |
+
|
| 90 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 91 |
+
|
| 92 |
+
### Use directly in PostgreSQL
|
| 93 |
+
|
| 94 |
+
1. Create Table
|
| 95 |
+
|
| 96 |
+
```sql
|
| 97 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 98 |
+
id BIGSERIAL PRIMARY KEY,
|
| 99 |
+
url VARCHAR NOT NULL,
|
| 100 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 101 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 102 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 103 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 104 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 105 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 106 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 107 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 108 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 109 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 110 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 111 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 112 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 113 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 114 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 115 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 116 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 117 |
+
);
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
2. Load csv file to database
|
| 121 |
+
|
| 122 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 123 |
+
|
| 124 |
+
```sql
|
| 125 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 126 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 127 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 128 |
+
...
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 132 |
+
|
| 133 |
+
```sql
|
| 134 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 135 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 136 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 137 |
+
...
|
| 138 |
+
```
|
| 139 |
+
|
| 140 |
+
3. Create Indexes
|
| 141 |
+
|
| 142 |
+
You need to create the following indexes for the best performance.
|
| 143 |
+
|
| 144 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 145 |
+
|
| 146 |
+
```sql
|
| 147 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 161 |
+
residual_quantization = true
|
| 162 |
+
[build.internal]
|
| 163 |
+
lists = [20000]
|
| 164 |
+
build_threads = 6
|
| 165 |
+
spherical_centroids = false
|
| 166 |
+
$$);
|
| 167 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 168 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 169 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 170 |
+
```
|
.history/README_20250513112527.md
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image.
|
| 31 |
+
- width: The width of the image in pixels.
|
| 32 |
+
- height: The height of the image in pixels.
|
| 33 |
+
- mime_type: The MIME type of the image file.
|
| 34 |
+
- hash: The MD5 hash of the image file.
|
| 35 |
+
- license: The URL of the image license.
|
| 36 |
+
- source : The source organization of the image.
|
| 37 |
+
|
| 38 |
+
```
|
| 39 |
+
\d is_pd12m;
|
| 40 |
+
Table "public.is_pd12m"
|
| 41 |
+
Column | Type | Collation | Nullable | Default
|
| 42 |
+
----------------------+-----------------------------+-----------+----------+---------------
|
| 43 |
+
caption_long | character varying | | not null |
|
| 44 |
+
origin_width | bigint | | not null |
|
| 45 |
+
origin_height | bigint | | not null |
|
| 46 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 47 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 48 |
+
processed_width | bigint | | not null |
|
| 49 |
+
processed_height | bigint | | not null |
|
| 50 |
+
aspect_ratio | double precision | | not null |
|
| 51 |
+
exif | jsonb | | not null |
|
| 52 |
+
meta | jsonb | | not null |
|
| 53 |
+
created_at | timestamp without time zone | | not null |
|
| 54 |
+
updated_at | timestamp without time zone | | not null |
|
| 55 |
+
source | jsonb | | not null |
|
| 56 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 57 |
+
Indexes:
|
| 58 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 59 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 60 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 61 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 62 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 63 |
+
"is_pd12m_exif_index" gin (exif)
|
| 64 |
+
"is_pd12m_meta_index" gin (meta)
|
| 65 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 66 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 67 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 68 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 69 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 70 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 71 |
+
"is_pd12m_source_index" gin (source)
|
| 72 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 73 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 74 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 75 |
+
residual_quantization = true
|
| 76 |
+
[build.internal]
|
| 77 |
+
lists = [20000]
|
| 78 |
+
build_threads = 6
|
| 79 |
+
spherical_centroids = false
|
| 80 |
+
')
|
| 81 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
## Uses
|
| 85 |
+
|
| 86 |
+
This dataset is available for a wide range of applications.
|
| 87 |
+
|
| 88 |
+
### Use with Chipmunk
|
| 89 |
+
|
| 90 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 91 |
+
|
| 92 |
+
### Use directly in PostgreSQL
|
| 93 |
+
|
| 94 |
+
1. Create Table
|
| 95 |
+
|
| 96 |
+
```sql
|
| 97 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 98 |
+
id BIGSERIAL PRIMARY KEY,
|
| 99 |
+
url VARCHAR NOT NULL,
|
| 100 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 101 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 102 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 103 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 104 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 105 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 106 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 107 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 108 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 109 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 110 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 111 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 112 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 113 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 114 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 115 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 116 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 117 |
+
);
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
2. Load csv file to database
|
| 121 |
+
|
| 122 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 123 |
+
|
| 124 |
+
```sql
|
| 125 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 126 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 127 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 128 |
+
...
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 132 |
+
|
| 133 |
+
```sql
|
| 134 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 135 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 136 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 137 |
+
...
|
| 138 |
+
```
|
| 139 |
+
|
| 140 |
+
3. Create Indexes
|
| 141 |
+
|
| 142 |
+
You need to create the following indexes for the best performance.
|
| 143 |
+
|
| 144 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 145 |
+
|
| 146 |
+
```sql
|
| 147 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 161 |
+
residual_quantization = true
|
| 162 |
+
[build.internal]
|
| 163 |
+
lists = [20000]
|
| 164 |
+
build_threads = 6
|
| 165 |
+
spherical_centroids = false
|
| 166 |
+
$$);
|
| 167 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 168 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 169 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 170 |
+
```
|
.history/README_20250513112603.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image.
|
| 31 |
+
- origin_hash: The MD5 hash of the original image file.
|
| 32 |
+
- origin_width: The width of the original image in pixels.
|
| 33 |
+
- origin_height: The height of the original image in pixels.
|
| 34 |
+
|
| 35 |
+
```
|
| 36 |
+
\d is_pd12m;
|
| 37 |
+
Table "public.is_pd12m"
|
| 38 |
+
Column | Type | Collation | Nullable | Default
|
| 39 |
+
origin_width | bigint | | not null |
|
| 40 |
+
origin_height | bigint | | not null |
|
| 41 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 42 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 43 |
+
processed_width | bigint | | not null |
|
| 44 |
+
processed_height | bigint | | not null |
|
| 45 |
+
aspect_ratio | double precision | | not null |
|
| 46 |
+
exif | jsonb | | not null |
|
| 47 |
+
meta | jsonb | | not null |
|
| 48 |
+
created_at | timestamp without time zone | | not null |
|
| 49 |
+
updated_at | timestamp without time zone | | not null |
|
| 50 |
+
source | jsonb | | not null |
|
| 51 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 52 |
+
Indexes:
|
| 53 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 54 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 55 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 56 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 57 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 58 |
+
"is_pd12m_exif_index" gin (exif)
|
| 59 |
+
"is_pd12m_meta_index" gin (meta)
|
| 60 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 61 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 62 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 63 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 64 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 65 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 66 |
+
"is_pd12m_source_index" gin (source)
|
| 67 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 68 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 69 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 70 |
+
residual_quantization = true
|
| 71 |
+
[build.internal]
|
| 72 |
+
lists = [20000]
|
| 73 |
+
build_threads = 6
|
| 74 |
+
spherical_centroids = false
|
| 75 |
+
')
|
| 76 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
## Uses
|
| 80 |
+
|
| 81 |
+
This dataset is available for a wide range of applications.
|
| 82 |
+
|
| 83 |
+
### Use with Chipmunk
|
| 84 |
+
|
| 85 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 86 |
+
|
| 87 |
+
### Use directly in PostgreSQL
|
| 88 |
+
|
| 89 |
+
1. Create Table
|
| 90 |
+
|
| 91 |
+
```sql
|
| 92 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 93 |
+
id BIGSERIAL PRIMARY KEY,
|
| 94 |
+
url VARCHAR NOT NULL,
|
| 95 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 97 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 98 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 99 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 100 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 101 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 102 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 103 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 104 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 105 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 106 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 107 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 108 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 109 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 110 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 111 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 112 |
+
);
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
2. Load csv file to database
|
| 116 |
+
|
| 117 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 118 |
+
|
| 119 |
+
```sql
|
| 120 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 121 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 122 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 123 |
+
...
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 127 |
+
|
| 128 |
+
```sql
|
| 129 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 130 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 131 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 132 |
+
...
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
3. Create Indexes
|
| 136 |
+
|
| 137 |
+
You need to create the following indexes for the best performance.
|
| 138 |
+
|
| 139 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 140 |
+
|
| 141 |
+
```sql
|
| 142 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 156 |
+
residual_quantization = true
|
| 157 |
+
[build.internal]
|
| 158 |
+
lists = [20000]
|
| 159 |
+
build_threads = 6
|
| 160 |
+
spherical_centroids = false
|
| 161 |
+
$$);
|
| 162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 163 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 164 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 165 |
+
```
|
.history/README_20250513112723.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image.
|
| 31 |
+
- origin_hash: The MD5 hash of the original image file.
|
| 32 |
+
- origin_width: The width of the original image in pixels.
|
| 33 |
+
- origin_height: The height of the original image in pixels.
|
| 34 |
+
- origin_storage_id: The storage ID of the original image file.
|
| 35 |
+
```
|
| 36 |
+
\d is_pd12m;
|
| 37 |
+
Table "public.is_pd12m"
|
| 38 |
+
Column | Type | Collation | Nullable | Default
|
| 39 |
+
origin_width | bigint | | not null |
|
| 40 |
+
origin_height | bigint | | not null |
|
| 41 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 42 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 43 |
+
processed_width | bigint | | not null |
|
| 44 |
+
processed_height | bigint | | not null |
|
| 45 |
+
aspect_ratio | double precision | | not null |
|
| 46 |
+
exif | jsonb | | not null |
|
| 47 |
+
meta | jsonb | | not null |
|
| 48 |
+
created_at | timestamp without time zone | | not null |
|
| 49 |
+
updated_at | timestamp without time zone | | not null |
|
| 50 |
+
source | jsonb | | not null |
|
| 51 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 52 |
+
Indexes:
|
| 53 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 54 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 55 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 56 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 57 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 58 |
+
"is_pd12m_exif_index" gin (exif)
|
| 59 |
+
"is_pd12m_meta_index" gin (meta)
|
| 60 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 61 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 62 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 63 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 64 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 65 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 66 |
+
"is_pd12m_source_index" gin (source)
|
| 67 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 68 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 69 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 70 |
+
residual_quantization = true
|
| 71 |
+
[build.internal]
|
| 72 |
+
lists = [20000]
|
| 73 |
+
build_threads = 6
|
| 74 |
+
spherical_centroids = false
|
| 75 |
+
')
|
| 76 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
## Uses
|
| 80 |
+
|
| 81 |
+
This dataset is available for a wide range of applications.
|
| 82 |
+
|
| 83 |
+
### Use with Chipmunk
|
| 84 |
+
|
| 85 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 86 |
+
|
| 87 |
+
### Use directly in PostgreSQL
|
| 88 |
+
|
| 89 |
+
1. Create Table
|
| 90 |
+
|
| 91 |
+
```sql
|
| 92 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 93 |
+
id BIGSERIAL PRIMARY KEY,
|
| 94 |
+
url VARCHAR NOT NULL,
|
| 95 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 96 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 97 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 98 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 99 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 100 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 101 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 102 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 103 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 104 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 105 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 106 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 107 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 108 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 109 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 110 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 111 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 112 |
+
);
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
2. Load csv file to database
|
| 116 |
+
|
| 117 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 118 |
+
|
| 119 |
+
```sql
|
| 120 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 121 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 122 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 123 |
+
...
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 127 |
+
|
| 128 |
+
```sql
|
| 129 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 130 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 131 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 132 |
+
...
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
3. Create Indexes
|
| 136 |
+
|
| 137 |
+
You need to create the following indexes for the best performance.
|
| 138 |
+
|
| 139 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 140 |
+
|
| 141 |
+
```sql
|
| 142 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 143 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 144 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 145 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 156 |
+
residual_quantization = true
|
| 157 |
+
[build.internal]
|
| 158 |
+
lists = [20000]
|
| 159 |
+
build_threads = 6
|
| 160 |
+
spherical_centroids = false
|
| 161 |
+
$$);
|
| 162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 163 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 164 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 165 |
+
```
|
.history/README_20250513112731.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image.
|
| 31 |
+
- origin_hash: The MD5 hash of the original image file.
|
| 32 |
+
- origin_width: The width of the original image in pixels.
|
| 33 |
+
- origin_height: The height of the original image in pixels.
|
| 34 |
+
- origin_storage_id: The storage ID of the original image file.
|
| 35 |
+
- processed_storage_id: The storage ID of the processed image file.
|
| 36 |
+
- processed_width: The width of the processed image in pixels.
|
| 37 |
+
- processed_height: The height of the processed image in pixels.
|
| 38 |
+
- aspect_ratio: The aspect ratio of the image.
|
| 39 |
+
- exif: The EXIF data of the image.
|
| 40 |
+
- meta: The metadata of the image.
|
| 41 |
+
- source: The source organization of the image.
|
| 42 |
+
- vector: The vector embedding of the image.
|
| 43 |
+
- created_at: The creation time of the image.
|
| 44 |
+
- updated_at: The update time of the image.
|
| 45 |
+
```
|
| 46 |
+
\d is_pd12m;
|
| 47 |
+
Table "public.is_pd12m"
|
| 48 |
+
Column | Type | Collation | Nullable | Default
|
| 49 |
+
origin_width | bigint | | not null |
|
| 50 |
+
origin_height | bigint | | not null |
|
| 51 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 52 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 53 |
+
processed_width | bigint | | not null |
|
| 54 |
+
processed_height | bigint | | not null |
|
| 55 |
+
aspect_ratio | double precision | | not null |
|
| 56 |
+
exif | jsonb | | not null |
|
| 57 |
+
meta | jsonb | | not null |
|
| 58 |
+
created_at | timestamp without time zone | | not null |
|
| 59 |
+
updated_at | timestamp without time zone | | not null |
|
| 60 |
+
source | jsonb | | not null |
|
| 61 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 62 |
+
Indexes:
|
| 63 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 64 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 65 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 66 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 67 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 68 |
+
"is_pd12m_exif_index" gin (exif)
|
| 69 |
+
"is_pd12m_meta_index" gin (meta)
|
| 70 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 71 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 72 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 73 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 74 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 75 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 76 |
+
"is_pd12m_source_index" gin (source)
|
| 77 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 78 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 79 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 80 |
+
residual_quantization = true
|
| 81 |
+
[build.internal]
|
| 82 |
+
lists = [20000]
|
| 83 |
+
build_threads = 6
|
| 84 |
+
spherical_centroids = false
|
| 85 |
+
')
|
| 86 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
## Uses
|
| 90 |
+
|
| 91 |
+
This dataset is available for a wide range of applications.
|
| 92 |
+
|
| 93 |
+
### Use with Chipmunk
|
| 94 |
+
|
| 95 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 96 |
+
|
| 97 |
+
### Use directly in PostgreSQL
|
| 98 |
+
|
| 99 |
+
1. Create Table
|
| 100 |
+
|
| 101 |
+
```sql
|
| 102 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 103 |
+
id BIGSERIAL PRIMARY KEY,
|
| 104 |
+
url VARCHAR NOT NULL,
|
| 105 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 106 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 107 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 108 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 109 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 110 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 111 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 112 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 113 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 114 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 115 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 116 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 117 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 118 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 119 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 120 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 121 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 122 |
+
);
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
2. Load csv file to database
|
| 126 |
+
|
| 127 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 128 |
+
|
| 129 |
+
```sql
|
| 130 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 131 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 132 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 133 |
+
...
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 137 |
+
|
| 138 |
+
```sql
|
| 139 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 140 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 141 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 142 |
+
...
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
3. Create Indexes
|
| 146 |
+
|
| 147 |
+
You need to create the following indexes for the best performance.
|
| 148 |
+
|
| 149 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 150 |
+
|
| 151 |
+
```sql
|
| 152 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 163 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 164 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 165 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 166 |
+
residual_quantization = true
|
| 167 |
+
[build.internal]
|
| 168 |
+
lists = [20000]
|
| 169 |
+
build_threads = 6
|
| 170 |
+
spherical_centroids = false
|
| 171 |
+
$$);
|
| 172 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 173 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 174 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 175 |
+
```
|
.history/README_20250513112734.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image.
|
| 31 |
+
- origin_hash: The MD5 hash of the original image file.
|
| 32 |
+
- origin_width: The width of the original image in pixels.
|
| 33 |
+
- origin_height: The height of the original image in pixels.
|
| 34 |
+
- origin_storage_id: The storage ID of the original image file.
|
| 35 |
+
- processed_storage_id: The storage ID of the processed image file.
|
| 36 |
+
- processed_width: The width of the processed image in pixels.
|
| 37 |
+
- processed_height: The height of the processed image in pixels.
|
| 38 |
+
- aspect_ratio: The aspect ratio of the image.
|
| 39 |
+
- exif: The EXIF data of the image.
|
| 40 |
+
- meta: The metadata of the image.
|
| 41 |
+
- source: The source organization of the image.
|
| 42 |
+
- vector: The vector embedding of the image.
|
| 43 |
+
- created_at: The creation time of the image.
|
| 44 |
+
- updated_at: The update time of the image.
|
| 45 |
+
```
|
| 46 |
+
\d is_pd12m;
|
| 47 |
+
Table "public.is_pd12m"
|
| 48 |
+
Column | Type | Collation | Nullable | Default
|
| 49 |
+
origin_width | bigint | | not null |
|
| 50 |
+
origin_height | bigint | | not null |
|
| 51 |
+
origin_storage_id | character varying(1024) | | not null |
|
| 52 |
+
processed_storage_id | character varying(1024) | | not null |
|
| 53 |
+
processed_width | bigint | | not null |
|
| 54 |
+
processed_height | bigint | | not null |
|
| 55 |
+
aspect_ratio | double precision | | not null |
|
| 56 |
+
exif | jsonb | | not null |
|
| 57 |
+
meta | jsonb | | not null |
|
| 58 |
+
created_at | timestamp without time zone | | not null |
|
| 59 |
+
updated_at | timestamp without time zone | | not null |
|
| 60 |
+
source | jsonb | | not null |
|
| 61 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
| 62 |
+
Indexes:
|
| 63 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
| 64 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
| 65 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
| 66 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
| 67 |
+
"is_pd12m_created_at_index" btree (created_at)
|
| 68 |
+
"is_pd12m_exif_index" gin (exif)
|
| 69 |
+
"is_pd12m_meta_index" gin (meta)
|
| 70 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
| 71 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
| 72 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
| 73 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
| 74 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
| 75 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
| 76 |
+
"is_pd12m_source_index" gin (source)
|
| 77 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
| 78 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
| 79 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
| 80 |
+
residual_quantization = true
|
| 81 |
+
[build.internal]
|
| 82 |
+
lists = [20000]
|
| 83 |
+
build_threads = 6
|
| 84 |
+
spherical_centroids = false
|
| 85 |
+
')
|
| 86 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
## Uses
|
| 90 |
+
|
| 91 |
+
This dataset is available for a wide range of applications.
|
| 92 |
+
|
| 93 |
+
### Use with Chipmunk
|
| 94 |
+
|
| 95 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 96 |
+
|
| 97 |
+
### Use directly in PostgreSQL
|
| 98 |
+
|
| 99 |
+
1. Create Table
|
| 100 |
+
|
| 101 |
+
```sql
|
| 102 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 103 |
+
id BIGSERIAL PRIMARY KEY,
|
| 104 |
+
url VARCHAR NOT NULL,
|
| 105 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 106 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 107 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 108 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 109 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 110 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 111 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 112 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 113 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 114 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 115 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 116 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 117 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 118 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 119 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 120 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 121 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 122 |
+
);
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
2. Load csv file to database
|
| 126 |
+
|
| 127 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 128 |
+
|
| 129 |
+
```sql
|
| 130 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 131 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 132 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 133 |
+
...
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 137 |
+
|
| 138 |
+
```sql
|
| 139 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 140 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 141 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 142 |
+
...
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
3. Create Indexes
|
| 146 |
+
|
| 147 |
+
You need to create the following indexes for the best performance.
|
| 148 |
+
|
| 149 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 150 |
+
|
| 151 |
+
```sql
|
| 152 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 163 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 164 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 165 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 166 |
+
residual_quantization = true
|
| 167 |
+
[build.internal]
|
| 168 |
+
lists = [20000]
|
| 169 |
+
build_threads = 6
|
| 170 |
+
spherical_centroids = false
|
| 171 |
+
$$);
|
| 172 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 173 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 174 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 175 |
+
```
|
.history/README_20250513112743.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image.
|
| 31 |
+
- origin_hash: The MD5 hash of the original image file.
|
| 32 |
+
- origin_width: The width of the original image in pixels.
|
| 33 |
+
- origin_height: The height of the original image in pixels.
|
| 34 |
+
- origin_storage_id: The storage ID of the original image file.
|
| 35 |
+
- processed_storage_id: The storage ID of the processed image file.
|
| 36 |
+
- processed_width: The width of the processed image in pixels.
|
| 37 |
+
- processed_height: The height of the processed image in pixels.
|
| 38 |
+
- aspect_ratio: The aspect ratio of the image.
|
| 39 |
+
- exif: The EXIF data of the image.
|
| 40 |
+
- meta: The metadata of the image.
|
| 41 |
+
- source: The source organization of the image.
|
| 42 |
+
- vector: The vector embedding of the image.
|
| 43 |
+
- created_at: The creation time of the image.
|
| 44 |
+
- updated_at: The update time of the image.
|
| 45 |
+
|
| 46 |
+
## Uses
|
| 47 |
+
|
| 48 |
+
This dataset is available for a wide range of applications.
|
| 49 |
+
|
| 50 |
+
### Use with Chipmunk
|
| 51 |
+
|
| 52 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 53 |
+
|
| 54 |
+
### Use directly in PostgreSQL
|
| 55 |
+
|
| 56 |
+
1. Create Table
|
| 57 |
+
|
| 58 |
+
```sql
|
| 59 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 60 |
+
id BIGSERIAL PRIMARY KEY,
|
| 61 |
+
url VARCHAR NOT NULL,
|
| 62 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 63 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 64 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 65 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 66 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 67 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 68 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 69 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 70 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 71 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 72 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 73 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 74 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 75 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 76 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 77 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 78 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 79 |
+
);
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
2. Load csv file to database
|
| 83 |
+
|
| 84 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 85 |
+
|
| 86 |
+
```sql
|
| 87 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 88 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 89 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 90 |
+
...
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 94 |
+
|
| 95 |
+
```sql
|
| 96 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 97 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 98 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 99 |
+
...
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
3. Create Indexes
|
| 103 |
+
|
| 104 |
+
You need to create the following indexes for the best performance.
|
| 105 |
+
|
| 106 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 107 |
+
|
| 108 |
+
```sql
|
| 109 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 110 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 111 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 112 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 113 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 114 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 115 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 116 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 117 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 118 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 119 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 120 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 121 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 122 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 123 |
+
residual_quantization = true
|
| 124 |
+
[build.internal]
|
| 125 |
+
lists = [20000]
|
| 126 |
+
build_threads = 6
|
| 127 |
+
spherical_centroids = false
|
| 128 |
+
$$);
|
| 129 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 130 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 131 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 132 |
+
```
|
.history/README_20250513112758.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image.
|
| 31 |
+
- origin_hash: The MD5 hash of the original image file.
|
| 32 |
+
- origin_width: The width of the original image in pixels.
|
| 33 |
+
- origin_height: The height of the original image in pixels.
|
| 34 |
+
- origin_storage_id: The storage ID of the original image file.
|
| 35 |
+
- processed_storage_id: The storage ID of the processed image file.
|
| 36 |
+
- processed_width: The width of the processed image in pixels.
|
| 37 |
+
- processed_height: The height of the processed image in pixels.
|
| 38 |
+
- aspect_ratio: The aspect ratio of the image.
|
| 39 |
+
- exif: The EXIF data of the image.
|
| 40 |
+
- meta: The metadata of the image.
|
| 41 |
+
- source: The source organization of the image.
|
| 42 |
+
- vector: The vector embedding of the image.
|
| 43 |
+
- created_at: The creation time of the image.
|
| 44 |
+
- updated_at: The update time of the image.
|
| 45 |
+
|
| 46 |
+
## Uses
|
| 47 |
+
|
| 48 |
+
This dataset is available for a wide range of applications.
|
| 49 |
+
|
| 50 |
+
### Use with Chipmunk
|
| 51 |
+
|
| 52 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 53 |
+
|
| 54 |
+
### Use directly in PostgreSQL
|
| 55 |
+
|
| 56 |
+
1. Create Table
|
| 57 |
+
|
| 58 |
+
```sql
|
| 59 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 60 |
+
id BIGSERIAL PRIMARY KEY,
|
| 61 |
+
url VARCHAR NOT NULL,
|
| 62 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 63 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 64 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 65 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 66 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 67 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 68 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 69 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 70 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 71 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 72 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 73 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 74 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 75 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 76 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 77 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 78 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 79 |
+
);
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
2. Load csv file to database
|
| 83 |
+
|
| 84 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 85 |
+
|
| 86 |
+
```sql
|
| 87 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 88 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 89 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 90 |
+
...
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 94 |
+
|
| 95 |
+
```sql
|
| 96 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 97 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 98 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 99 |
+
...
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
3. Create Indexes
|
| 103 |
+
|
| 104 |
+
You need to create the following indexes for the best performance.
|
| 105 |
+
|
| 106 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 107 |
+
|
| 108 |
+
```sql
|
| 109 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 110 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 111 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 112 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 113 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 114 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 115 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 116 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 117 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 118 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 119 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 120 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 121 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 122 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 123 |
+
residual_quantization = true
|
| 124 |
+
[build.internal]
|
| 125 |
+
lists = [20000]
|
| 126 |
+
build_threads = 6
|
| 127 |
+
spherical_centroids = false
|
| 128 |
+
$$);
|
| 129 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 130 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 131 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 132 |
+
```
|
.history/README_20250513122556.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image.
|
| 31 |
+
- origin_hash: The MD5 hash of the original image file.
|
| 32 |
+
- origin_width: The width of the original image in pixels.
|
| 33 |
+
- origin_height: The height of the original image in pixels.
|
| 34 |
+
- origin_storage_id: The storage ID of the original image file.
|
| 35 |
+
- processed_storage_id: The storage ID of the processed image file.
|
| 36 |
+
- processed_width: The width of the processed image in pixels.
|
| 37 |
+
- processed_height: The height of the processed image in pixels.
|
| 38 |
+
- aspect_ratio: The aspect ratio of the image.
|
| 39 |
+
- exif: The EXIF data of the image.
|
| 40 |
+
- meta: The metadata of the image.
|
| 41 |
+
- source: The source organization of the image.
|
| 42 |
+
- vector: The vector embedding of the image.
|
| 43 |
+
- created_at: The creation time of the image.
|
| 44 |
+
- updated_at: The update time of the image.
|
| 45 |
+
|
| 46 |
+
## Uses
|
| 47 |
+
|
| 48 |
+
This dataset is available for a wide range of applications.
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
### Use directly in PostgreSQL
|
| 52 |
+
|
| 53 |
+
1. Create Table
|
| 54 |
+
|
| 55 |
+
```sql
|
| 56 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 57 |
+
id BIGSERIAL PRIMARY KEY,
|
| 58 |
+
url VARCHAR NOT NULL,
|
| 59 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 60 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 61 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 62 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 63 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 64 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 65 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 66 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 67 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 68 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 69 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 70 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 71 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 72 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 73 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 74 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 75 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 76 |
+
);
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
2. Load csv file to database
|
| 80 |
+
|
| 81 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 85 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 86 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 87 |
+
...
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 91 |
+
|
| 92 |
+
```sql
|
| 93 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 94 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 95 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 96 |
+
...
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
3. Create Indexes
|
| 100 |
+
|
| 101 |
+
You need to create the following indexes for the best performance.
|
| 102 |
+
|
| 103 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 104 |
+
|
| 105 |
+
```sql
|
| 106 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 107 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 108 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 109 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 110 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 111 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 112 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 113 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 114 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 115 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 116 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 117 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 118 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 119 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 120 |
+
residual_quantization = true
|
| 121 |
+
[build.internal]
|
| 122 |
+
lists = [20000]
|
| 123 |
+
build_threads = 6
|
| 124 |
+
spherical_centroids = false
|
| 125 |
+
$$);
|
| 126 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 127 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 128 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 129 |
+
```
|
.history/README_20250513122636.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image.
|
| 31 |
+
- origin_hash: The MD5 hash of the original image file.
|
| 32 |
+
- origin_width: The width of the original image in pixels.
|
| 33 |
+
- origin_height: The height of the original image in pixels.
|
| 34 |
+
- origin_storage_id: The storage ID of the original image file.
|
| 35 |
+
- processed_storage_id: The storage ID of the processed image file.
|
| 36 |
+
- processed_width: The width of the processed image in pixels.
|
| 37 |
+
- processed_height: The height of the processed image in pixels.
|
| 38 |
+
- aspect_ratio: The aspect ratio of the image.
|
| 39 |
+
- exif: The EXIF data of the image.
|
| 40 |
+
- meta: The metadata of the image.
|
| 41 |
+
- source: The source organization of the image.
|
| 42 |
+
- vector: The vector embedding of the image.
|
| 43 |
+
- created_at: The creation time of the image.
|
| 44 |
+
- updated_at: The update time of the image.
|
| 45 |
+
|
| 46 |
+
## Uses
|
| 47 |
+
|
| 48 |
+
This dataset is available for a wide range of applications.
|
| 49 |
+
|
| 50 |
+
### Use with Chipmunk
|
| 51 |
+
|
| 52 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
| 53 |
+
|
| 54 |
+
### Use directly in PostgreSQL
|
| 55 |
+
|
| 56 |
+
1. Create Table
|
| 57 |
+
|
| 58 |
+
```sql
|
| 59 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 60 |
+
id BIGSERIAL PRIMARY KEY,
|
| 61 |
+
url VARCHAR NOT NULL,
|
| 62 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 63 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 64 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 65 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 66 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 67 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 68 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 69 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 70 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 71 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 72 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 73 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 74 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 75 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 76 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 77 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 78 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 79 |
+
);
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
2. Load csv file to database
|
| 83 |
+
|
| 84 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 85 |
+
|
| 86 |
+
```sql
|
| 87 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 88 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 89 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 90 |
+
...
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 94 |
+
|
| 95 |
+
```sql
|
| 96 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 97 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 98 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 99 |
+
...
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
3. Create Indexes
|
| 103 |
+
|
| 104 |
+
You need to create the following indexes for the best performance.
|
| 105 |
+
|
| 106 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 107 |
+
|
| 108 |
+
```sql
|
| 109 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 110 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 111 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 112 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 113 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 114 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 115 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 116 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 117 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 118 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 119 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 120 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 121 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 122 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 123 |
+
residual_quantization = true
|
| 124 |
+
[build.internal]
|
| 125 |
+
lists = [20000]
|
| 126 |
+
build_threads = 6
|
| 127 |
+
spherical_centroids = false
|
| 128 |
+
$$);
|
| 129 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 130 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 131 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 132 |
+
```
|
.history/README_20250513122638.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image.
|
| 31 |
+
- origin_hash: The MD5 hash of the original image file.
|
| 32 |
+
- origin_width: The width of the original image in pixels.
|
| 33 |
+
- origin_height: The height of the original image in pixels.
|
| 34 |
+
- origin_storage_id: The storage ID of the original image file.
|
| 35 |
+
- processed_storage_id: The storage ID of the processed image file.
|
| 36 |
+
- processed_width: The width of the processed image in pixels.
|
| 37 |
+
- processed_height: The height of the processed image in pixels.
|
| 38 |
+
- aspect_ratio: The aspect ratio of the image.
|
| 39 |
+
- exif: The EXIF data of the image.
|
| 40 |
+
- meta: The metadata of the image.
|
| 41 |
+
- source: The source organization of the image.
|
| 42 |
+
- vector: The vector embedding of the image.
|
| 43 |
+
- created_at: The creation time of the image.
|
| 44 |
+
- updated_at: The update time of the image.
|
| 45 |
+
|
| 46 |
+
## Uses
|
| 47 |
+
|
| 48 |
+
This dataset is available for a wide range of applications.
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
### Use directly in PostgreSQL
|
| 52 |
+
|
| 53 |
+
1. Create Table
|
| 54 |
+
|
| 55 |
+
```sql
|
| 56 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 57 |
+
id BIGSERIAL PRIMARY KEY,
|
| 58 |
+
url VARCHAR NOT NULL,
|
| 59 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 60 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 61 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 62 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 63 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 64 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 65 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 66 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 67 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 68 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 69 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 70 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 71 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 72 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 73 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 74 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 75 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 76 |
+
);
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
2. Load csv file to database
|
| 80 |
+
|
| 81 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 82 |
+
|
| 83 |
+
```sql
|
| 84 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 85 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 86 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 87 |
+
...
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 91 |
+
|
| 92 |
+
```sql
|
| 93 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 94 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 95 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 96 |
+
...
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
3. Create Indexes
|
| 100 |
+
|
| 101 |
+
You need to create the following indexes for the best performance.
|
| 102 |
+
|
| 103 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 104 |
+
|
| 105 |
+
```sql
|
| 106 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 107 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 108 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 109 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 110 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 111 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 112 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 113 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 114 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 115 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 116 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 117 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 118 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 119 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 120 |
+
residual_quantization = true
|
| 121 |
+
[build.internal]
|
| 122 |
+
lists = [20000]
|
| 123 |
+
build_threads = 6
|
| 124 |
+
spherical_centroids = false
|
| 125 |
+
$$);
|
| 126 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 127 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 128 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 129 |
+
```
|
.history/README_20250513122646.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- feature-extraction
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Dataset Card for `PD12M`
|
| 12 |
+
|
| 13 |
+
This is a curated PD12M dataset for use with the [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk) project.
|
| 14 |
+
|
| 15 |
+
## Dataset Details
|
| 16 |
+
|
| 17 |
+
### Dataset Description
|
| 18 |
+
|
| 19 |
+
This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m) image collection, refined by filtering for active image links. EXIF data was extracted, and images underwent preprocessing and feature extraction using [SigLIP 2](https://huggingface.co/papers/2502.14786). All vector embeddings are normalized 16-bit half-precision vectors optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord).
|
| 20 |
+
|
| 21 |
+
### Dataset Sources
|
| 22 |
+
|
| 23 |
+
This dataset is derived and organized from [Spawning/PD12M](http://huggingface.co/datasets/Spawning/PD12M). The original license information for the image can be found in the corresponding entry of the original database.
|
| 24 |
+
|
| 25 |
+
## Dataset Structure
|
| 26 |
+
|
| 27 |
+
- id: A unique identifier for the image.
|
| 28 |
+
- url: The URL of the image.
|
| 29 |
+
- caption: A caption for the image.
|
| 30 |
+
- caption_long: A long caption for the image.
|
| 31 |
+
- origin_hash: The MD5 hash of the original image file.
|
| 32 |
+
- origin_width: The width of the original image in pixels.
|
| 33 |
+
- origin_height: The height of the original image in pixels.
|
| 34 |
+
- origin_storage_id: The storage ID of the original image file.
|
| 35 |
+
- processed_storage_id: The storage ID of the processed image file.
|
| 36 |
+
- processed_width: The width of the processed image in pixels.
|
| 37 |
+
- processed_height: The height of the processed image in pixels.
|
| 38 |
+
- aspect_ratio: The aspect ratio of the image.
|
| 39 |
+
- exif: The EXIF data of the image.
|
| 40 |
+
- meta: The metadata of the image.
|
| 41 |
+
- source: The source organization of the image.
|
| 42 |
+
- vector: The vector embedding of the image.
|
| 43 |
+
- created_at: The creation time of the image.
|
| 44 |
+
- updated_at: The update time of the image.
|
| 45 |
+
|
| 46 |
+
## Uses
|
| 47 |
+
|
| 48 |
+
This dataset is available for a wide range of applications.
|
| 49 |
+
|
| 50 |
+
### Use directly in PostgreSQL
|
| 51 |
+
|
| 52 |
+
1. Create Table
|
| 53 |
+
|
| 54 |
+
```sql
|
| 55 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
| 56 |
+
id BIGSERIAL PRIMARY KEY,
|
| 57 |
+
url VARCHAR NOT NULL,
|
| 58 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
| 59 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
| 60 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
| 61 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
| 62 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
| 63 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
| 64 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
| 65 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
| 66 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
| 67 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
| 68 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
| 69 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
| 70 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
| 71 |
+
source JSONB NOT NULL DEFAULT '[]',
|
| 72 |
+
vector halfvec(1152) DEFAULT NULL,
|
| 73 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
| 74 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
| 75 |
+
);
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
2. Load csv file to database
|
| 79 |
+
|
| 80 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
| 81 |
+
|
| 82 |
+
```sql
|
| 83 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 84 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 85 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 86 |
+
...
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
| 90 |
+
|
| 91 |
+
```sql
|
| 92 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
| 93 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
| 94 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
| 95 |
+
...
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
3. Create Indexes
|
| 99 |
+
|
| 100 |
+
You need to create the following indexes for the best performance.
|
| 101 |
+
|
| 102 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
| 103 |
+
|
| 104 |
+
```sql
|
| 105 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
| 106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
| 107 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
| 108 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
| 109 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
| 110 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
| 111 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
| 112 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
| 113 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
| 114 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
| 115 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
| 116 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
| 117 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
| 118 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
| 119 |
+
residual_quantization = true
|
| 120 |
+
[build.internal]
|
| 121 |
+
lists = [20000]
|
| 122 |
+
build_threads = 6
|
| 123 |
+
spherical_centroids = false
|
| 124 |
+
$$);
|
| 125 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
| 126 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
| 127 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
| 128 |
+
```
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
### Use with Chipmunk
|
| 132 |
+
|
| 133 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|