The dataset viewer is not available for this dataset.
Error code: ConfigNamesError Exception: DataFilesNotFoundError Message: No (supported) data files found in KBlueLeaf/danbooru2023-sqlite Traceback: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 72, in compute_config_names_response config_names = get_dataset_config_names( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 347, in get_dataset_config_names dataset_module = dataset_module_factory( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1904, in dataset_module_factory raise e1 from None File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1885, in dataset_module_factory return HubDatasetModuleFactoryWithoutScript( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 1270, in get_module module_name, default_builder_kwargs = infer_module_for_data_files( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/load.py", line 597, in infer_module_for_data_files raise DataFilesNotFoundError("No (supported) data files found" + (f" in {path}" if path else "")) datasets.exceptions.DataFilesNotFoundError: No (supported) data files found in KBlueLeaf/danbooru2023-sqlite
Need help to make the dataset viewer work? Open a discussion for direct support.
Metadata Database for Danbooru2023
Danbooru 2023 datasets: https://huggingface.co/datasets/nyanko7/danbooru2023
The latest entry of this database is id 7,600,039. Which is newer than nyanko7's dataset.
This dataset contains a sqlite db file which have all the tags and posts metadata in it.
The Peewee ORM config file is provided too, plz check it for more information. (Especially on how I link posts and tags together)
The original data is from the official dump of the posts info.
Check this link for more info.
Details
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.
Custom Enum Fields
Some fields in Post/Tags use my custom enum field to store type/category or something like that:
- Post.rating
- 0: general
- 1: sensitive
- 2: questionable
- 3: explicit
- Tag.type
- 0: general
- 1: artist
- 2: character
- 3: copyright
- 4: meta
Tag List
I use peewee ManyToManyField to implement the Tag List things. Which utilize a through model which have all the pair of Tag and Post
Since it is very likely we will want to use Tag to query posts, so many-to-many is better.
The con of this design is the database file will be 1.5x larger than before(we have 0.25B entries for the post-tag pairs), but the query speed become 2~3x faster, so I think it is acceptable.
After done some checking, I can ensure that all the "categorical tag list" can be done by full list + filter, and that is how I done it now. Check the db.py for more details.
Utils
if you think above details are too complicated, just use the db_utils.py and other PeeWee API to utilize this database. I also provide a write_csv.py for exporting whole dataset into csv for data analysis.
License
The source code, database file of this repo is licensed under MiT License.
Notice: The license doesn't cover the "content" of the database.
All the content is from official danbooru dumps for posts' meta.
Acknowledgement
Thx for AngelBottomless for fixing wrong entries and add more entries into this dataset:
https://huggingface.co/datasets/AngelBottomless/danbooru-2023-sqlite-fixed-7110548
Thx for AngelBottomless for updating new entries
- Downloads last month
- 5