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_20250513101818.md +109 -0
- .history/README_20250513101823.md +109 -0
- .history/README_20250513101834.md +109 -0
- .history/README_20250513101836.md +109 -0
- .history/README_20250513101846.md +109 -0
- .history/README_20250513101854.md +109 -0
- .history/README_20250513102007.md +109 -0
- .history/README_20250513103952.md +109 -0
- .history/README_20250513103953.md +109 -0
- .history/README_20250513103954.md +109 -0
- .history/README_20250513103957.md +109 -0
- .history/README_20250513104030.md +109 -0
- .history/README_20250513104104.md +109 -0
- .history/README_20250513104204.md +109 -0
- .history/README_20250513104214.md +109 -0
- .history/README_20250513104240.md +109 -0
- .history/README_20250513111019.md +108 -0
- .history/README_20250513111025.md +109 -0
- .history/README_20250513111030.md +109 -0
- .history/README_20250513111043.md +109 -0
- .history/README_20250513111111.md +109 -0
- .history/README_20250513111112.md +111 -0
- .history/README_20250513112320.md +162 -0
- .history/README_20250513112324.md +162 -0
- .history/README_20250513112329.md +162 -0
- .history/README_20250513112334.md +162 -0
- .history/README_20250513112341.md +164 -0
- .history/README_20250513112353.md +164 -0
- .history/README_20250513112357.md +164 -0
- .history/README_20250513112401.md +164 -0
- .history/README_20250513112411.md +164 -0
- .history/README_20250513112420.md +164 -0
- .history/README_20250513112423.md +164 -0
- .history/README_20250513112429.md +164 -0
- .history/README_20250513112431.md +164 -0
- .history/README_20250513112436.md +164 -0
- .history/README_20250513112439.md +164 -0
- .history/README_20250513112452.md +172 -0
- .history/README_20250513112515.md +169 -0
- .history/README_20250513112522.md +170 -0
- .history/README_20250513112531.md +168 -0
- .history/README_20250513112617.md +168 -0
- .history/README_20250513112619.md +170 -0
- .history/README_20250513112620.md +168 -0
- .history/README_20250513112719.md +165 -0
- .history/README_20250513112725.md +171 -0
- .history/README_20250513112727.md +170 -0
- .history/README_20250513112728.md +176 -0
- .history/README_20250513112733.md +176 -0
- .history/README_20250513122557.md +128 -0
.history/README_20250513101818.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_20250513101823.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_20250513101834.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 |
+
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_20250513101836.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 |
+
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_20250513101846.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 |
+
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_20250513101854.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 |
+
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_20250513102007.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_20250513103952.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】. 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_20250513103953.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]. 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_20250513103954.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]. 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_20250513103957.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_20250513104030.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_20250513104104.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_20250513104204.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_20250513104214.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_20250513104240.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_20250513111019.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 |
+
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_20250513111025.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_20250513111030.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_20250513111043.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_20250513111111.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 |
+
## Dataset Structure
|
26 |
+
|
27 |
+
## Uses
|
28 |
+
|
29 |
+
This dataset is available for a wide range of applications.
|
30 |
+
|
31 |
+
### Use with Chipmunk
|
32 |
+
|
33 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
34 |
+
|
35 |
+
### Use directly in PostgreSQL
|
36 |
+
|
37 |
+
1. Create Table
|
38 |
+
|
39 |
+
```sql
|
40 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
41 |
+
id BIGSERIAL PRIMARY KEY,
|
42 |
+
url VARCHAR NOT NULL,
|
43 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
44 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
45 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
46 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
47 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
48 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
49 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
50 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
51 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
52 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
53 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
54 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
55 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
56 |
+
source JSONB NOT NULL DEFAULT '[]',
|
57 |
+
vector halfvec(1152) DEFAULT NULL,
|
58 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
59 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
60 |
+
);
|
61 |
+
```
|
62 |
+
|
63 |
+
2. Load csv file to database
|
64 |
+
|
65 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
66 |
+
|
67 |
+
```sql
|
68 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
69 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
70 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
71 |
+
...
|
72 |
+
```
|
73 |
+
|
74 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
75 |
+
|
76 |
+
```sql
|
77 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
78 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
79 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
80 |
+
...
|
81 |
+
```
|
82 |
+
|
83 |
+
3. Create Indexes
|
84 |
+
|
85 |
+
```sql
|
86 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
87 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
88 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
98 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
99 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
100 |
+
residual_quantization = true
|
101 |
+
[build.internal]
|
102 |
+
lists = [20000]
|
103 |
+
build_threads = 6
|
104 |
+
spherical_centroids = false
|
105 |
+
$$);
|
106 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
107 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
108 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
109 |
+
```
|
.history/README_20250513111112.md
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
## Uses
|
30 |
+
|
31 |
+
This dataset is available for a wide range of applications.
|
32 |
+
|
33 |
+
### Use with Chipmunk
|
34 |
+
|
35 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
36 |
+
|
37 |
+
### Use directly in PostgreSQL
|
38 |
+
|
39 |
+
1. Create Table
|
40 |
+
|
41 |
+
```sql
|
42 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
43 |
+
id BIGSERIAL PRIMARY KEY,
|
44 |
+
url VARCHAR NOT NULL,
|
45 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
46 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
47 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
48 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
49 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
50 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
51 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
52 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
53 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
54 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
55 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
56 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
57 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
58 |
+
source JSONB NOT NULL DEFAULT '[]',
|
59 |
+
vector halfvec(1152) DEFAULT NULL,
|
60 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
61 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
62 |
+
);
|
63 |
+
```
|
64 |
+
|
65 |
+
2. Load csv file to database
|
66 |
+
|
67 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
68 |
+
|
69 |
+
```sql
|
70 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
71 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
72 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
73 |
+
...
|
74 |
+
```
|
75 |
+
|
76 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
77 |
+
|
78 |
+
```sql
|
79 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
80 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
81 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
82 |
+
...
|
83 |
+
```
|
84 |
+
|
85 |
+
3. Create Indexes
|
86 |
+
|
87 |
+
```sql
|
88 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
89 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
90 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
91 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
92 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
93 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
94 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
95 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
96 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
97 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
98 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
99 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
100 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
101 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
102 |
+
residual_quantization = true
|
103 |
+
[build.internal]
|
104 |
+
lists = [20000]
|
105 |
+
build_threads = 6
|
106 |
+
spherical_centroids = false
|
107 |
+
$$);
|
108 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
109 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
110 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
111 |
+
```
|
.history/README_20250513112320.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 |
+
|
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_20250513112324.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 |
+
|
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_20250513112329.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 |
+
|
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_20250513112334.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_20250513112341.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 |
+
|
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_20250513112353.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).
|
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_20250513112357.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
|
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_20250513112401.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
|
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_20250513112411.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
|
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_20250513112420.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_20250513112423.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 vec
|
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_20250513112429.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 vector
|
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_20250513112431.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://github.com/tensorchord/vectorchord) repository.
|
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_20250513112436.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://github.com/tensorchord/vectorchord) 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_20250513112439.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_20250513112452.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_20250513112515.md
ADDED
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_long | character varying | | not null |
|
43 |
+
origin_width | bigint | | not null |
|
44 |
+
origin_height | bigint | | not null |
|
45 |
+
origin_storage_id | character varying(1024) | | not null |
|
46 |
+
processed_storage_id | character varying(1024) | | not null |
|
47 |
+
processed_width | bigint | | not null |
|
48 |
+
processed_height | bigint | | not null |
|
49 |
+
aspect_ratio | double precision | | not null |
|
50 |
+
exif | jsonb | | not null |
|
51 |
+
meta | jsonb | | not null |
|
52 |
+
created_at | timestamp without time zone | | not null |
|
53 |
+
updated_at | timestamp without time zone | | not null |
|
54 |
+
source | jsonb | | not null |
|
55 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
56 |
+
Indexes:
|
57 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
58 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
59 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
60 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
61 |
+
"is_pd12m_created_at_index" btree (created_at)
|
62 |
+
"is_pd12m_exif_index" gin (exif)
|
63 |
+
"is_pd12m_meta_index" gin (meta)
|
64 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
65 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
66 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
67 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
68 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
69 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
70 |
+
"is_pd12m_source_index" gin (source)
|
71 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
72 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
73 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
74 |
+
residual_quantization = true
|
75 |
+
[build.internal]
|
76 |
+
lists = [20000]
|
77 |
+
build_threads = 6
|
78 |
+
spherical_centroids = false
|
79 |
+
')
|
80 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
81 |
+
```
|
82 |
+
|
83 |
+
## Uses
|
84 |
+
|
85 |
+
This dataset is available for a wide range of applications.
|
86 |
+
|
87 |
+
### Use with Chipmunk
|
88 |
+
|
89 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
90 |
+
|
91 |
+
### Use directly in PostgreSQL
|
92 |
+
|
93 |
+
1. Create Table
|
94 |
+
|
95 |
+
```sql
|
96 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
97 |
+
id BIGSERIAL PRIMARY KEY,
|
98 |
+
url VARCHAR NOT NULL,
|
99 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
100 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
101 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
102 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
103 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
104 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
105 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
106 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
107 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
108 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
109 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
110 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
111 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
112 |
+
source JSONB NOT NULL DEFAULT '[]',
|
113 |
+
vector halfvec(1152) DEFAULT NULL,
|
114 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
115 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
116 |
+
);
|
117 |
+
```
|
118 |
+
|
119 |
+
2. Load csv file to database
|
120 |
+
|
121 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
122 |
+
|
123 |
+
```sql
|
124 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
125 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
126 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
127 |
+
...
|
128 |
+
```
|
129 |
+
|
130 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
131 |
+
|
132 |
+
```sql
|
133 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
134 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
135 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
136 |
+
...
|
137 |
+
```
|
138 |
+
|
139 |
+
3. Create Indexes
|
140 |
+
|
141 |
+
You need to create the following indexes for the best performance.
|
142 |
+
|
143 |
+
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.
|
144 |
+
|
145 |
+
```sql
|
146 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
160 |
+
residual_quantization = true
|
161 |
+
[build.internal]
|
162 |
+
lists = [20000]
|
163 |
+
build_threads = 6
|
164 |
+
spherical_centroids = false
|
165 |
+
$$);
|
166 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
167 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
168 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
169 |
+
```
|
.history/README_20250513112522.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_20250513112531.md
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
origin_width | bigint | | not null |
|
43 |
+
origin_height | bigint | | not null |
|
44 |
+
origin_storage_id | character varying(1024) | | not null |
|
45 |
+
processed_storage_id | character varying(1024) | | not null |
|
46 |
+
processed_width | bigint | | not null |
|
47 |
+
processed_height | bigint | | not null |
|
48 |
+
aspect_ratio | double precision | | not null |
|
49 |
+
exif | jsonb | | not null |
|
50 |
+
meta | jsonb | | not null |
|
51 |
+
created_at | timestamp without time zone | | not null |
|
52 |
+
updated_at | timestamp without time zone | | not null |
|
53 |
+
source | jsonb | | not null |
|
54 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
55 |
+
Indexes:
|
56 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
57 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
58 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
59 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
60 |
+
"is_pd12m_created_at_index" btree (created_at)
|
61 |
+
"is_pd12m_exif_index" gin (exif)
|
62 |
+
"is_pd12m_meta_index" gin (meta)
|
63 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
64 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
65 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
66 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
67 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
68 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
69 |
+
"is_pd12m_source_index" gin (source)
|
70 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
71 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
72 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
73 |
+
residual_quantization = true
|
74 |
+
[build.internal]
|
75 |
+
lists = [20000]
|
76 |
+
build_threads = 6
|
77 |
+
spherical_centroids = false
|
78 |
+
')
|
79 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
80 |
+
```
|
81 |
+
|
82 |
+
## Uses
|
83 |
+
|
84 |
+
This dataset is available for a wide range of applications.
|
85 |
+
|
86 |
+
### Use with Chipmunk
|
87 |
+
|
88 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
89 |
+
|
90 |
+
### Use directly in PostgreSQL
|
91 |
+
|
92 |
+
1. Create Table
|
93 |
+
|
94 |
+
```sql
|
95 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
96 |
+
id BIGSERIAL PRIMARY KEY,
|
97 |
+
url VARCHAR NOT NULL,
|
98 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
99 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
100 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
101 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
102 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
103 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
104 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
105 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
106 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
107 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
108 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
109 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
110 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
111 |
+
source JSONB NOT NULL DEFAULT '[]',
|
112 |
+
vector halfvec(1152) DEFAULT NULL,
|
113 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
114 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
115 |
+
);
|
116 |
+
```
|
117 |
+
|
118 |
+
2. Load csv file to database
|
119 |
+
|
120 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
121 |
+
|
122 |
+
```sql
|
123 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
124 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
125 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
126 |
+
...
|
127 |
+
```
|
128 |
+
|
129 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
130 |
+
|
131 |
+
```sql
|
132 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
133 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
134 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
135 |
+
...
|
136 |
+
```
|
137 |
+
|
138 |
+
3. Create Indexes
|
139 |
+
|
140 |
+
You need to create the following indexes for the best performance.
|
141 |
+
|
142 |
+
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.
|
143 |
+
|
144 |
+
```sql
|
145 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
159 |
+
residual_quantization = true
|
160 |
+
[build.internal]
|
161 |
+
lists = [20000]
|
162 |
+
build_threads = 6
|
163 |
+
spherical_centroids = false
|
164 |
+
$$);
|
165 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
166 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
167 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
168 |
+
```
|
.history/README_20250513112617.md
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
origin_width | bigint | | not null |
|
43 |
+
origin_height | bigint | | not null |
|
44 |
+
origin_storage_id | character varying(1024) | | not null |
|
45 |
+
processed_storage_id | character varying(1024) | | not null |
|
46 |
+
processed_width | bigint | | not null |
|
47 |
+
processed_height | bigint | | not null |
|
48 |
+
aspect_ratio | double precision | | not null |
|
49 |
+
exif | jsonb | | not null |
|
50 |
+
meta | jsonb | | not null |
|
51 |
+
created_at | timestamp without time zone | | not null |
|
52 |
+
updated_at | timestamp without time zone | | not null |
|
53 |
+
source | jsonb | | not null |
|
54 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
55 |
+
Indexes:
|
56 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
57 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
58 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
59 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
60 |
+
"is_pd12m_created_at_index" btree (created_at)
|
61 |
+
"is_pd12m_exif_index" gin (exif)
|
62 |
+
"is_pd12m_meta_index" gin (meta)
|
63 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
64 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
65 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
66 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
67 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
68 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
69 |
+
"is_pd12m_source_index" gin (source)
|
70 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
71 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
72 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
73 |
+
residual_quantization = true
|
74 |
+
[build.internal]
|
75 |
+
lists = [20000]
|
76 |
+
build_threads = 6
|
77 |
+
spherical_centroids = false
|
78 |
+
')
|
79 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
80 |
+
```
|
81 |
+
|
82 |
+
## Uses
|
83 |
+
|
84 |
+
This dataset is available for a wide range of applications.
|
85 |
+
|
86 |
+
### Use with Chipmunk
|
87 |
+
|
88 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
89 |
+
|
90 |
+
### Use directly in PostgreSQL
|
91 |
+
|
92 |
+
1. Create Table
|
93 |
+
|
94 |
+
```sql
|
95 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
96 |
+
id BIGSERIAL PRIMARY KEY,
|
97 |
+
url VARCHAR NOT NULL,
|
98 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
99 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
100 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
101 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
102 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
103 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
104 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
105 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
106 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
107 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
108 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
109 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
110 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
111 |
+
source JSONB NOT NULL DEFAULT '[]',
|
112 |
+
vector halfvec(1152) DEFAULT NULL,
|
113 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
114 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
115 |
+
);
|
116 |
+
```
|
117 |
+
|
118 |
+
2. Load csv file to database
|
119 |
+
|
120 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
121 |
+
|
122 |
+
```sql
|
123 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
124 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
125 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
126 |
+
...
|
127 |
+
```
|
128 |
+
|
129 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
130 |
+
|
131 |
+
```sql
|
132 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
133 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
134 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
135 |
+
...
|
136 |
+
```
|
137 |
+
|
138 |
+
3. Create Indexes
|
139 |
+
|
140 |
+
You need to create the following indexes for the best performance.
|
141 |
+
|
142 |
+
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.
|
143 |
+
|
144 |
+
```sql
|
145 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
159 |
+
residual_quantization = true
|
160 |
+
[build.internal]
|
161 |
+
lists = [20000]
|
162 |
+
build_threads = 6
|
163 |
+
spherical_centroids = false
|
164 |
+
$$);
|
165 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
166 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
167 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
168 |
+
```
|
.history/README_20250513112619.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_20250513112620.md
ADDED
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
origin_width | bigint | | not null |
|
43 |
+
origin_height | bigint | | not null |
|
44 |
+
origin_storage_id | character varying(1024) | | not null |
|
45 |
+
processed_storage_id | character varying(1024) | | not null |
|
46 |
+
processed_width | bigint | | not null |
|
47 |
+
processed_height | bigint | | not null |
|
48 |
+
aspect_ratio | double precision | | not null |
|
49 |
+
exif | jsonb | | not null |
|
50 |
+
meta | jsonb | | not null |
|
51 |
+
created_at | timestamp without time zone | | not null |
|
52 |
+
updated_at | timestamp without time zone | | not null |
|
53 |
+
source | jsonb | | not null |
|
54 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
55 |
+
Indexes:
|
56 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
57 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
58 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
59 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
60 |
+
"is_pd12m_created_at_index" btree (created_at)
|
61 |
+
"is_pd12m_exif_index" gin (exif)
|
62 |
+
"is_pd12m_meta_index" gin (meta)
|
63 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
64 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
65 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
66 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
67 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
68 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
69 |
+
"is_pd12m_source_index" gin (source)
|
70 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
71 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
72 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
73 |
+
residual_quantization = true
|
74 |
+
[build.internal]
|
75 |
+
lists = [20000]
|
76 |
+
build_threads = 6
|
77 |
+
spherical_centroids = false
|
78 |
+
')
|
79 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
80 |
+
```
|
81 |
+
|
82 |
+
## Uses
|
83 |
+
|
84 |
+
This dataset is available for a wide range of applications.
|
85 |
+
|
86 |
+
### Use with Chipmunk
|
87 |
+
|
88 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
89 |
+
|
90 |
+
### Use directly in PostgreSQL
|
91 |
+
|
92 |
+
1. Create Table
|
93 |
+
|
94 |
+
```sql
|
95 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
96 |
+
id BIGSERIAL PRIMARY KEY,
|
97 |
+
url VARCHAR NOT NULL,
|
98 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
99 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
100 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
101 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
102 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
103 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
104 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
105 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
106 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
107 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
108 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
109 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
110 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
111 |
+
source JSONB NOT NULL DEFAULT '[]',
|
112 |
+
vector halfvec(1152) DEFAULT NULL,
|
113 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
114 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
115 |
+
);
|
116 |
+
```
|
117 |
+
|
118 |
+
2. Load csv file to database
|
119 |
+
|
120 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
121 |
+
|
122 |
+
```sql
|
123 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
124 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
125 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
126 |
+
...
|
127 |
+
```
|
128 |
+
|
129 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
130 |
+
|
131 |
+
```sql
|
132 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
133 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
134 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
135 |
+
...
|
136 |
+
```
|
137 |
+
|
138 |
+
3. Create Indexes
|
139 |
+
|
140 |
+
You need to create the following indexes for the best performance.
|
141 |
+
|
142 |
+
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.
|
143 |
+
|
144 |
+
```sql
|
145 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
146 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
147 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
148 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
149 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
150 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
151 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
152 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
153 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
159 |
+
residual_quantization = true
|
160 |
+
[build.internal]
|
161 |
+
lists = [20000]
|
162 |
+
build_threads = 6
|
163 |
+
spherical_centroids = false
|
164 |
+
$$);
|
165 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
166 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
167 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
168 |
+
```
|
.history/README_20250513112719.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_20250513112725.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 |
+
- 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 |
+
|
41 |
+
```
|
42 |
+
\d is_pd12m;
|
43 |
+
Table "public.is_pd12m"
|
44 |
+
Column | Type | Collation | Nullable | Default
|
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_20250513112727.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 |
+
- 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 |
+
```
|
41 |
+
\d is_pd12m;
|
42 |
+
Table "public.is_pd12m"
|
43 |
+
Column | Type | Collation | Nullable | Default
|
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_20250513112728.md
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
```
|
47 |
+
\d is_pd12m;
|
48 |
+
Table "public.is_pd12m"
|
49 |
+
Column | Type | Collation | Nullable | Default
|
50 |
+
origin_width | bigint | | not null |
|
51 |
+
origin_height | bigint | | not null |
|
52 |
+
origin_storage_id | character varying(1024) | | not null |
|
53 |
+
processed_storage_id | character varying(1024) | | not null |
|
54 |
+
processed_width | bigint | | not null |
|
55 |
+
processed_height | bigint | | not null |
|
56 |
+
aspect_ratio | double precision | | not null |
|
57 |
+
exif | jsonb | | not null |
|
58 |
+
meta | jsonb | | not null |
|
59 |
+
created_at | timestamp without time zone | | not null |
|
60 |
+
updated_at | timestamp without time zone | | not null |
|
61 |
+
source | jsonb | | not null |
|
62 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
63 |
+
Indexes:
|
64 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
65 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
66 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
67 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
68 |
+
"is_pd12m_created_at_index" btree (created_at)
|
69 |
+
"is_pd12m_exif_index" gin (exif)
|
70 |
+
"is_pd12m_meta_index" gin (meta)
|
71 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
72 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
73 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
74 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
75 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
76 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
77 |
+
"is_pd12m_source_index" gin (source)
|
78 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
79 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
80 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
81 |
+
residual_quantization = true
|
82 |
+
[build.internal]
|
83 |
+
lists = [20000]
|
84 |
+
build_threads = 6
|
85 |
+
spherical_centroids = false
|
86 |
+
')
|
87 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
88 |
+
```
|
89 |
+
|
90 |
+
## Uses
|
91 |
+
|
92 |
+
This dataset is available for a wide range of applications.
|
93 |
+
|
94 |
+
### Use with Chipmunk
|
95 |
+
|
96 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
97 |
+
|
98 |
+
### Use directly in PostgreSQL
|
99 |
+
|
100 |
+
1. Create Table
|
101 |
+
|
102 |
+
```sql
|
103 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
104 |
+
id BIGSERIAL PRIMARY KEY,
|
105 |
+
url VARCHAR NOT NULL,
|
106 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
107 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
108 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
109 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
110 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
111 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
112 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
113 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
114 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
115 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
116 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
117 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
118 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
119 |
+
source JSONB NOT NULL DEFAULT '[]',
|
120 |
+
vector halfvec(1152) DEFAULT NULL,
|
121 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
122 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
123 |
+
);
|
124 |
+
```
|
125 |
+
|
126 |
+
2. Load csv file to database
|
127 |
+
|
128 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
129 |
+
|
130 |
+
```sql
|
131 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
132 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
133 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
134 |
+
...
|
135 |
+
```
|
136 |
+
|
137 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
138 |
+
|
139 |
+
```sql
|
140 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
141 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
142 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
143 |
+
...
|
144 |
+
```
|
145 |
+
|
146 |
+
3. Create Indexes
|
147 |
+
|
148 |
+
You need to create the following indexes for the best performance.
|
149 |
+
|
150 |
+
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.
|
151 |
+
|
152 |
+
```sql
|
153 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
163 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
164 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
165 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
166 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
167 |
+
residual_quantization = true
|
168 |
+
[build.internal]
|
169 |
+
lists = [20000]
|
170 |
+
build_threads = 6
|
171 |
+
spherical_centroids = false
|
172 |
+
$$);
|
173 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
174 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
175 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
176 |
+
```
|
.history/README_20250513112733.md
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
```
|
47 |
+
\d is_pd12m;
|
48 |
+
Table "public.is_pd12m"
|
49 |
+
Column | Type | Collation | Nullable | Default
|
50 |
+
origin_width | bigint | | not null |
|
51 |
+
origin_height | bigint | | not null |
|
52 |
+
origin_storage_id | character varying(1024) | | not null |
|
53 |
+
processed_storage_id | character varying(1024) | | not null |
|
54 |
+
processed_width | bigint | | not null |
|
55 |
+
processed_height | bigint | | not null |
|
56 |
+
aspect_ratio | double precision | | not null |
|
57 |
+
exif | jsonb | | not null |
|
58 |
+
meta | jsonb | | not null |
|
59 |
+
created_at | timestamp without time zone | | not null |
|
60 |
+
updated_at | timestamp without time zone | | not null |
|
61 |
+
source | jsonb | | not null |
|
62 |
+
vector | halfvec(1152) | | | NULL::halfvec
|
63 |
+
Indexes:
|
64 |
+
"id_pd12m_pkey" PRIMARY KEY, btree (id)
|
65 |
+
"is_pd12m_aspect_ratio_index" btree (aspect_ratio)
|
66 |
+
"is_pd12m_caption_index" btree (caption) WHERE caption::text = ''::text
|
67 |
+
"is_pd12m_caption_long_index" btree (caption_long) WHERE caption_long::text = ''::text
|
68 |
+
"is_pd12m_created_at_index" btree (created_at)
|
69 |
+
"is_pd12m_exif_index" gin (exif)
|
70 |
+
"is_pd12m_meta_index" gin (meta)
|
71 |
+
"is_pd12m_origin_height_index" btree (origin_height)
|
72 |
+
"is_pd12m_origin_storage_id_index" btree (origin_storage_id)
|
73 |
+
"is_pd12m_origin_width_index" btree (origin_width)
|
74 |
+
"is_pd12m_processed_height_index" btree (processed_height)
|
75 |
+
"is_pd12m_processed_storage_id_index" btree (processed_storage_id)
|
76 |
+
"is_pd12m_processed_width_index" btree (processed_width)
|
77 |
+
"is_pd12m_source_index" gin (source)
|
78 |
+
"is_pd12m_updated_at_index" btree (updated_at)
|
79 |
+
"is_pd12m_url_index" UNIQUE, btree (url)
|
80 |
+
"is_pd12m_vector_index" vchordrq (vector halfvec_l2_ops) WITH (options='
|
81 |
+
residual_quantization = true
|
82 |
+
[build.internal]
|
83 |
+
lists = [20000]
|
84 |
+
build_threads = 6
|
85 |
+
spherical_centroids = false
|
86 |
+
')
|
87 |
+
"is_pd12m_vector_null_index" btree (vector) WHERE vector IS NULL
|
88 |
+
```
|
89 |
+
|
90 |
+
## Uses
|
91 |
+
|
92 |
+
This dataset is available for a wide range of applications.
|
93 |
+
|
94 |
+
### Use with Chipmunk
|
95 |
+
|
96 |
+
Click this link to learn how to load the dataset to [Chipmunk](https://github.com/Intelligent-Internet/Chipmunk).
|
97 |
+
|
98 |
+
### Use directly in PostgreSQL
|
99 |
+
|
100 |
+
1. Create Table
|
101 |
+
|
102 |
+
```sql
|
103 |
+
CREATE TABLE IF NOT EXISTS is_pd12m (
|
104 |
+
id BIGSERIAL PRIMARY KEY,
|
105 |
+
url VARCHAR NOT NULL,
|
106 |
+
hash VARCHAR NOT NULL DEFAULT '',
|
107 |
+
caption VARCHAR NOT NULL DEFAULT '',
|
108 |
+
caption_long VARCHAR NOT NULL DEFAULT '',
|
109 |
+
origin_hash VARCHAR NOT NULL DEFAULT '',
|
110 |
+
origin_width BIGINT NOT NULL DEFAULT 0,
|
111 |
+
origin_height BIGINT NOT NULL DEFAULT 0,
|
112 |
+
origin_storage_id VARCHAR(1024) DEFAULT NULL,
|
113 |
+
processed_storage_id VARCHAR(1024) NOT NULL DEFAULT '',
|
114 |
+
processed_width BIGINT NOT NULL DEFAULT 0,
|
115 |
+
processed_height BIGINT NOT NULL DEFAULT 0,
|
116 |
+
aspect_ratio DOUBLE PRECISION NOT NULL DEFAULT 0,
|
117 |
+
exif JSONB NOT NULL DEFAULT '{}',
|
118 |
+
meta JSONB NOT NULL DEFAULT '{}',
|
119 |
+
source JSONB NOT NULL DEFAULT '[]',
|
120 |
+
vector halfvec(1152) DEFAULT NULL,
|
121 |
+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
122 |
+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
123 |
+
);
|
124 |
+
```
|
125 |
+
|
126 |
+
2. Load csv file to database
|
127 |
+
|
128 |
+
2.1. Load the dataset from local file system to a remote PostgreSQL server:
|
129 |
+
|
130 |
+
```sql
|
131 |
+
\copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
132 |
+
\copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
133 |
+
\copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
134 |
+
...
|
135 |
+
```
|
136 |
+
|
137 |
+
2.2. Load the dataset from the PostgreSQL server's file system:
|
138 |
+
|
139 |
+
```sql
|
140 |
+
copy is_pd12m FROM 'data/0000000.csv' CSV HEADER;
|
141 |
+
copy is_pd12m FROM 'data/0000001.csv' CSV HEADER;
|
142 |
+
copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
143 |
+
...
|
144 |
+
```
|
145 |
+
|
146 |
+
3. Create Indexes
|
147 |
+
|
148 |
+
You need to create the following indexes for the best performance.
|
149 |
+
|
150 |
+
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.
|
151 |
+
|
152 |
+
```sql
|
153 |
+
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
154 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
155 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_height_index ON is_pd12m (origin_height);
|
156 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_origin_storage_id_index ON is_pd12m (origin_storage_id);
|
157 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_storage_id_index ON is_pd12m (processed_storage_id);
|
158 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_width_index ON is_pd12m (processed_width);
|
159 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_processed_height_index ON is_pd12m (processed_height);
|
160 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_aspect_ratio_index ON is_pd12m (aspect_ratio);
|
161 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_exif_index ON is_pd12m USING gin(exif);
|
162 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_meta_index ON is_pd12m USING gin(meta);
|
163 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_source_index ON is_pd12m USING gin(source);
|
164 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_created_at_index ON is_pd12m (created_at);
|
165 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_updated_at_index ON is_pd12m (updated_at);
|
166 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_index ON is_pd12m USING vchordrq (vector halfvec_l2_ops) WITH (options = $$
|
167 |
+
residual_quantization = true
|
168 |
+
[build.internal]
|
169 |
+
lists = [20000]
|
170 |
+
build_threads = 6
|
171 |
+
spherical_centroids = false
|
172 |
+
$$);
|
173 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE caption = '';
|
174 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
175 |
+
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
176 |
+
```
|
.history/README_20250513122557.md
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
```
|