Datasets:
Update README.md with additional setup instructions
Browse files- Added detailed setup instructions for new users.
- Clarified the installation process and prerequisites.
- Included examples for better understanding.
- Improved formatting for readability.
README.md
CHANGED
@@ -22,6 +22,27 @@ This dataset comprises a curated [Public Domain 12M](https://source.plus/pd12m)
|
|
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.
|
@@ -80,6 +101,10 @@ copy is_pd12m FROM 'data/0000002.csv' CSV HEADER;
|
|
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);
|
@@ -105,5 +130,3 @@ CREATE INDEX IF NOT EXISTS is_pd12m_caption_index ON is_pd12m (caption) WHERE ca
|
|
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
|
|
|
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.
|
|
|
101 |
|
102 |
3. Create Indexes
|
103 |
|
104 |
+
You need to create the following indexes for the best performance.
|
105 |
+
|
106 |
+
The `vector` column is a halfvec(1152) column, which is a 16-bit half-precision vector optimized for L2 indexing with [vectorchord](https://github.com/tensorchord/vectorchord). You can get more information about the vector index from the [vectorchord](https://docs.vectorchord.ai/vectorchord/usage/indexing.html) documentation.
|
107 |
+
|
108 |
```sql
|
109 |
CREATE UNIQUE INDEX IF NOT EXISTS is_pd12m_url_index ON is_pd12m (url);
|
110 |
CREATE INDEX IF NOT EXISTS is_pd12m_origin_width_index ON is_pd12m (origin_width);
|
|
|
130 |
CREATE INDEX IF NOT EXISTS is_pd12m_caption_long_index ON is_pd12m (caption_long) WHERE caption_long = '';
|
131 |
CREATE INDEX IF NOT EXISTS is_pd12m_vector_null_index ON is_pd12m (vector) WHERE vector IS NULL;
|
132 |
```
|
|
|
|