{"id":21501191,"url":"https://github.com/rapidrabbit76/paintstensorflow","last_synced_at":"2025-07-15T22:32:13.274Z","repository":{"id":42505006,"uuid":"162320650","full_name":"rapidrabbit76/PaintsTensorFlow","owner":"rapidrabbit76","description":"line drawing colorization using TensorFlow","archived":false,"fork":false,"pushed_at":"2022-04-02T11:53:40.000Z","size":17367,"stargazers_count":51,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2023-03-11T11:56:47.240Z","etag":null,"topics":["colorization","gans","machine-learning","paintschainer","tensorflow","waifu2x"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/rapidrabbit76.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}},"created_at":"2018-12-18T17:04:17.000Z","updated_at":"2023-03-02T05:11:35.000Z","dependencies_parsed_at":"2022-09-08T22:12:08.692Z","dependency_job_id":null,"html_url":"https://github.com/rapidrabbit76/PaintsTensorFlow","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidrabbit76%2FPaintsTensorFlow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidrabbit76%2FPaintsTensorFlow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidrabbit76%2FPaintsTensorFlow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidrabbit76%2FPaintsTensorFlow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rapidrabbit76","download_url":"https://codeload.github.com/rapidrabbit76/PaintsTensorFlow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226077515,"owners_count":17570163,"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":["colorization","gans","machine-learning","paintschainer","tensorflow","waifu2x"],"created_at":"2024-11-23T17:49:51.418Z","updated_at":"2024-11-23T17:49:51.984Z","avatar_url":"https://github.com/rapidrabbit76.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PaintsTensorFlow\n\n\u003cimg src=\"./src/results/0.png\" width=\"800\"\u003e\n\n# Model Structure\n\n\u003cdetails\u003e\n\u003csummary\u003e Model Structure \u003c/summary\u003e\n\n## DraftModel\n\n\u003cimg src=\"./src/model structure/model 01.jpg\" width=\"800\"\u003e\n\n## Colorization\n\n\u003cimg src=\"./src/model structure/model 02.jpg\" width=\"800\"\u003e\n\n\u003c/details\u003e\n\n# Results\n\n### input(line) - input(hint) - draft - output - ground truth\n\nGray background in hint for visualization.\n\n\u003cimg src=\"./src/results/1.jpg\" width=\"800\"\u003e  \n\u003cimg src=\"./src/results/2.jpg\" width=\"800\"\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e More result image \u003c/summary\u003e\n\u003cimg src=\"./src/results/3.jpg\" width=\"800\"\u003e  \n\u003cimg src=\"./src/results/4.jpg\" width=\"800\"\u003e  \n\u003cimg src=\"./src/results/5.jpg\" width=\"800\"\u003e  \n\u003cimg src=\"./src/results/6.jpg\" width=\"800\"\u003e  \n\u003cimg src=\"./src/results/7.jpg\" width=\"800\"\u003e  \n\u003cimg src=\"./src/results/8.jpg\" width=\"800\"\u003e  \n\u003cimg src=\"./src/results/9.jpg\" width=\"800\"\u003e  \n\u003cimg src=\"./src/results/10.jpg\" width=\"800\"\u003e\n\u003c/details\u003e\n\n# GUI\n\nCurrent we does not provide a GUI.\n\ninstead, we are preparing a web service.\n\nif you want to use it locally using the GUI, refer to tag:[0.0.1](https://github.com/rapidrabbit76/PaintsTensorFlow/tree/0.0.1)\n\n\u003cdetails\u003e\n\u003csummary\u003eGUI\u003c/summary\u003e\n\n\u003cimg src=\"./src/GUI/1.png\" height=\"400\"\u003e\n\nFile - open( select Image )\n\n\u003cimg src=\"./src/GUI/2.png\" width=\"400\"\u003e\n\nClick \"Liner\" to create line art\n\n\u003cimg src=\"./src/GUI/3.png\" width=\"400\"\u003e\n\n\u003cimg src=\"./src/GUI/4.png\" width=\"400\"\u003e\n\nClick \"RUN\" to automatically color\n\n\u003cimg src=\"./src/GUI/5.png\" width=\"400\"\u003e\n\nClick \"Color\" to select a color and then draw a color hint\n\n\u003cimg src=\"./src/GUI/6.png\" width=\"400\"\u003e\n\nClick \"RUN\" to automatically color\n\n\u003c/details\u003e\n\n# Requirements\n\n- tensorflow==2.7.1\n- tensorflow-addons==0.16.1\n- albumentations==1.1.0\n- opencv-python-headless==4.5.5.62 \n- scipy==1.8.0\n- tqdm==4.61.2\n- wandb==0.12.11\n\n# Pretrained Model\n- draft saved_model [link](https://drive.google.com/drive/folders/1yKZ9gbVRznWP7ETowIqMbpZpveBh7Mhn?usp=sharing)\n- colorization saved_model [link](https://drive.google.com/drive/folders/1yKZ9gbVRznWP7ETowIqMbpZpveBh7Mhn?usp=sharing)\n- draft model onnx [link](https://drive.google.com/drive/folders/17A7db_zGxZllnlqjxf0_dkqIBeouACJa?usp=sharing)\n- colorization model onnx [link](https://drive.google.com/drive/folders/17A7db_zGxZllnlqjxf0_dkqIBeouACJa?usp=sharing)\n\n# Training\n\n- My dataset over 700,000 images and created a lines, using [SketchKeras](https://github.com/lllyasviel/sketchKeras)\n\n- dataset path structure (**image-line file name must be matched**)\n\n  ```\n  {DATASET PATH}\n  │\n  ├─ train\n  │   ├─ image\n  │   │    └─ 1.jpg, 2.jpg, N.jpg\n  │   ├─ line\n  │   │    └─ 1.jpg, 2.jpg, N.jpg\n  └─ test\n      ├─ image\n      │    └─ 1.jpg, 2.jpg, N.jpg\n      └─ line\n          └─ 1.jpg, 2.jpg, N.jpg\n  ```\n\n- [step 1]: Training draft model 128X128 size\n\n  ```\n  python3 main.py \\\n  --mode=\"draft\" \\\n  --root_dir={\"YOURE DATASET PATH\"} \\\n  --batch_size={BATCH_SIZE} \\\n  --epochs={EPOCHS} \\\n  --lr=0.0001\n  ```\n\n- [step 2]: Training Colorization model 512X512 size\n\n  ```\n  python3 main.py \\\n  --mode=\"colorization\" \\\n  --root_dir={\"YOURE DATASET PATH\"} \\\n  --batch_size={BATCH_SIZE} \\\n  --epochs={EPOCHS} \\\n  --lr=0.0001\n  ```\n\n# Convert to ONNX\n\n- check \"[convert2onnx.ipynb](./convert2onnx.ipynb)\"\n\n# References\n\n- [PaintsChainer](https://github.com/taizan/PaintsChainer/)\n- [SketchKeras](https://github.com/lllyasviel/sketchKeras)\n- [pix2pix](https://arxiv.org/pdf/1611.07004.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidrabbit76%2Fpaintstensorflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapidrabbit76%2Fpaintstensorflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidrabbit76%2Fpaintstensorflow/lists"}