Update README.md
Browse files
README.md
CHANGED
@@ -16,8 +16,49 @@ The Peewee ORM config file is provided too, plz check it for more information. (
|
|
16 |
The original data is from the official dump of the posts info.<br>
|
17 |
Check this [link](https://console.cloud.google.com/storage/browser/danbooru_public/data) for more info.
|
18 |
|
19 |
-
**The ID range of this dataset(\~7111459) is slightly larger then the danbooru2023 dataset(\~6899125)**
|
|
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
Thx for AngelBottomless for fixing wrong entries and add more entries into this dataset:<br>
|
22 |
https://huggingface.co/datasets/AngelBottomless/danbooru-2023-sqlite-fixed-7110548
|
23 |
|
|
|
16 |
The original data is from the official dump of the posts info.<br>
|
17 |
Check this [link](https://console.cloud.google.com/storage/browser/danbooru_public/data) for more info.
|
18 |
|
19 |
+
**The ID range of this dataset(\~7111459) is slightly larger then the danbooru2023 dataset(\~6899125)** <br>
|
20 |
+
**This dataset have 7073868 entries**
|
21 |
|
22 |
+
## Details
|
23 |
+
This section contains some details that you need to be aware of if you want to use other ORM system or use plain SQL query to utilize this database.
|
24 |
+
|
25 |
+
#### Custom Enum Fields
|
26 |
+
Some fields in Post/Tags use my custom enum field to store type/category or something like that:
|
27 |
+
|
28 |
+
* Post.rating
|
29 |
+
* 0: general
|
30 |
+
* 1: sensitive
|
31 |
+
* 2: questionable
|
32 |
+
* 3: explicit
|
33 |
+
* Tag.type
|
34 |
+
* 0: general
|
35 |
+
* 1: artist
|
36 |
+
* 2: character
|
37 |
+
* 3: copyright
|
38 |
+
* 4: meta
|
39 |
+
|
40 |
+
#### Tag List
|
41 |
+
SQLite doesn't support any arrayfield or many-to-many relationship natively.<br>
|
42 |
+
So I use a custom TextField to store ids of tags belongs to a Post.
|
43 |
+
|
44 |
+
The basic idea is to use 2 unique symbol for start/end of the number. And use 36-base number<br>
|
45 |
+
(python support converting n-base number into integer natively, numpy have utils to convert integer into n-base number)
|
46 |
+
|
47 |
+
I use $xxx# format, so when you want to utilize the FTS table to search tag_list, use $<36-base number# to find if the tag is in the tag-list.
|
48 |
+
|
49 |
+
|
50 |
+
#### Utils
|
51 |
+
if you think above details are too complicated, just use the db_utils.py and other PeeWee API to utilize this database.
|
52 |
+
I also provide a write_csv.py for exporting whole dataset into csv for data analysis.
|
53 |
+
|
54 |
+
|
55 |
+
## License
|
56 |
+
The source code, database file of this repo is licensed under MiT License.<br>
|
57 |
+
**Notice**: The license doesn't cover the "content" of the database.<br>
|
58 |
+
All the content is from official danbooru dumps for posts' meta.
|
59 |
+
|
60 |
+
|
61 |
+
## Acknowledgement
|
62 |
Thx for AngelBottomless for fixing wrong entries and add more entries into this dataset:<br>
|
63 |
https://huggingface.co/datasets/AngelBottomless/danbooru-2023-sqlite-fixed-7110548
|
64 |
|