{"id":15129931,"url":"https://github.com/kichangkim/deepdanbooru","last_synced_at":"2025-05-14T04:08:30.747Z","repository":{"id":39546218,"uuid":"229250747","full_name":"KichangKim/DeepDanbooru","owner":"KichangKim","description":"AI based multi-label girl image classification system, implemented by using TensorFlow.","archived":false,"fork":false,"pushed_at":"2024-08-27T14:36:49.000Z","size":77,"stargazers_count":2757,"open_issues_count":26,"forks_count":261,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-04-24T21:52:23.951Z","etag":null,"topics":["danbooru","machine-learning","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KichangKim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-20T11:15:08.000Z","updated_at":"2025-04-22T10:38:49.000Z","dependencies_parsed_at":"2024-01-14T04:44:01.072Z","dependency_job_id":"8c2dac65-6954-4a61-aaf9-0384671db749","html_url":"https://github.com/KichangKim/DeepDanbooru","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KichangKim%2FDeepDanbooru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KichangKim%2FDeepDanbooru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KichangKim%2FDeepDanbooru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KichangKim%2FDeepDanbooru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KichangKim","download_url":"https://codeload.github.com/KichangKim/DeepDanbooru/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254069849,"owners_count":22009558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["danbooru","machine-learning","tensorflow"],"created_at":"2024-09-26T02:24:34.991Z","updated_at":"2025-05-14T04:08:25.708Z","avatar_url":"https://github.com/KichangKim.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepDanbooru\n[![Python](https://img.shields.io/badge/python-3.11-green)](https://www.python.org/doc/versions/)\n[![GitHub](https://img.shields.io/github/license/KichangKim/DeepDanbooru)](https://opensource.org/licenses/MIT)\n[![Web](https://img.shields.io/badge/web%20demo-20200915-brightgreen)](http://kanotype.iptime.org:8003/deepdanbooru/)\n\n**DeepDanbooru** is anime-style girl image tag estimation system. You can estimate your images on my live demo site, [DeepDanbooru Web](http://dev.kanotype.net:8003/deepdanbooru/).\n\n## Requirements\nDeepDanbooru is written by Python 3.11. Following packages are need to be installed.\n- Click\u003e=8.1.7\n- numpy\u003e=1.26.4\n- requests\u003e=2.32.3\n- scikit-image\u003e=0.24.0\n- six\u003e=1.16.0\n- tensorflow\u003e=2.17.0\n- tensorflow-io\u003e=0.31.0\n\nOr just use `requirements.txt`.\n```\n\u003e pip install -r requirements.txt\n```\n\nalternatively you can install it with pip. Note that by default, tensorflow is not included.\n\nTo install it with tensorflow, add `tensorflow` extra package.\n\n```\n\u003e # default installation\n\u003e pip install .\n\u003e # with tensorflow package\n\u003e pip install .[tensorflow]\n```\n\n\n## Usage\n1. Prepare dataset. If you don't have, you can use [DanbooruDownloader](https://github.com/KichangKim/DanbooruDownloader) for download the dataset of [Danbooru](https://danbooru.donmai.us/). If you want to make your own dataset, see [Dataset Structure](#dataset-structure) section.\n2. Create training project folder.\n```\n\u003e deepdanbooru create-project [your_project_folder]\n```\n3. Prepare tag list. If you want to use latest tags, use following command. It downloads tag from Danbooru server. (Need Danbooru account and API key)\n```\n\u003e deepdanbooru download-tags [your_project_folder] --username [your_danbooru_account] --api-key [your_danbooru_api_key]\n```\n4. (Option) Filtering dataset. If you want to train with optional tags (rating and score), you should convert it as system tags.\n```\n\u003e deepdanbooru make-training-database [your_dataset_sqlite_path] [your_filtered_sqlite_path]\n```\n5. Modify `project.json` in the project folder. You should change `database_path` setting to your actual sqlite file path.\n6. Start training.\n```\n\u003e deepdanbooru train-project [your_project_folder]\n```\n7. Enjoy it.\n```\n\u003e deepdanbooru evaluate [image_file_path or folder]... --project-path [your_project_folder] --allow-folder\n```\n\n## Dataset Structure\nDeepDanbooru uses following folder structure for input dataset. SQLite file can be any name, but must be located in same folder to `images` folder. All of image files are located in sub-folder which named first 2 characters of its filename.\n```\nMyDataset/\n├── images/\n│   ├── 00/\n│   │   ├── 00000000000000000000000000000000.jpg\n│   │   ├── ...\n│   ├── 01/\n│   │   ├── 01000000000000000000000000000000.jpg\n│   │   ├── ...\n│   └── ff/\n│       ├── ff000000000000000000000000000000.jpg\n│       ├── ...\n└── my-dataset.sqlite\n```\nThe core is SQLite database file. That file must be contains following table structure.\n```\nposts\n├── id (INTEGER)\n├── md5 (TEXT)\n├── file_ext (TEXT)\n├── tag_string (TEXT)\n└── tag_count_general (INTEGER)\n```\nThe filename of image must be `[md5].[file_ext]`. If you use your own images, `md5` don't have to be actual MD5 hash value.\n\n`tag_string` is space splitted tag list, like `1girl ahoge long_hair`.\n\n`tag_count_general` is used for the project setting, `minimum_tag_count`. Images which has equal or larger value of `tag_count_general` are used for training.\n\n## Project Structure\n**Project** is minimal unit for training on DeepDanbooru. You can modify various parameters for training.\n```\nMyProject/\n├── project.json\n└── tags.txt\n```\n`tags.txt` contains all tags for estimating. You can make your own list or download latest tags from Danbooru server. It is simple newline-separated file like this:\n```\n1girl\nahoge\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkichangkim%2Fdeepdanbooru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkichangkim%2Fdeepdanbooru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkichangkim%2Fdeepdanbooru/lists"}