{"id":19947969,"url":"https://github.com/wufan-tb/animate-character-detection","last_synced_at":"2025-09-19T12:32:18.822Z","repository":{"id":60552477,"uuid":"199382488","full_name":"wufan-tb/animate-character-detection","owner":"wufan-tb","description":"An animate-character detector using SSD-master.","archived":false,"fork":false,"pushed_at":"2019-07-31T01:08:30.000Z","size":19398,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T13:48:53.828Z","etag":null,"topics":["animate","deep-learning","ssd"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wufan-tb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-29T05:12:50.000Z","updated_at":"2024-03-28T12:28:22.000Z","dependencies_parsed_at":"2022-10-01T07:50:12.149Z","dependency_job_id":null,"html_url":"https://github.com/wufan-tb/animate-character-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wufan-tb/animate-character-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wufan-tb%2Fanimate-character-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wufan-tb%2Fanimate-character-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wufan-tb%2Fanimate-character-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wufan-tb%2Fanimate-character-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wufan-tb","download_url":"https://codeload.github.com/wufan-tb/animate-character-detection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wufan-tb%2Fanimate-character-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275937106,"owners_count":25556022,"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","status":"online","status_checked_at":"2025-09-19T02:00:09.700Z","response_time":108,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["animate","deep-learning","ssd"],"created_at":"2024-11-13T00:38:08.028Z","updated_at":"2025-09-19T12:32:16.714Z","avatar_url":"https://github.com/wufan-tb.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Animate_character Detection\n **利用SSD训练一个动漫人物识别机.**\n\n## 前言\n  SSD在物体识别上很成功，很容易产生将它应用在人物识别上的想法。原本打算尝试一下去识别足球运动员，爬一些梅西C罗内马尔等球员的图片去训练，但后来觉得可能只可以识别出球队的队服，即巴萨的梅西和皇马的C罗之间很好识别，但是同样是巴萨队内的梅西，苏牙等等也许就不能很好地分辨了；同时用皇马C罗训练后，应该也无法识别出尤文的C罗。总的来说，**实际人物由于其着装，动作，表情，等等因素，做起来可能相对较难**，相比较之下**动漫人物特征鲜明，变化较少，做起来应该相对容易**，所以诞生了这样一个项目。  \n\n## 模型\n  用的大神的SSD模型：[SSD-master](https://github.com/balancap/SSD-Tensorflow)。此外，对可视化做了一点修改，输出不显示类别代号，直接显示类别名称（对本项目来说，就是人物名称）。    \n  训练好的模型文件超过了github的100M限制，鼓捣了半天也没有上传成功，请在此处下载：[网盘分享](https://pan.baidu.com/s/1uhXHGkG9Wk7SQZGXoXRCVw),提取码：869y。**下好后请解压到checkpoints文件夹内**。  \n  \n## 数据准备+训练\n(**不打算自己训练，想直接自己看测试结果的可以跳过这一步**)  \n  一般来讲imageNet上有很多用来训练机器视觉的数据，但动漫这块可能没什么人做（没有做大范围调查，可能有现成的数据库）。所以本文用来训练的图片都是自己从视频里逐帧提取的，剔除一些没有任务的图片后，手动打标签。由于工作量不小，而且瞎眼睛，目前**只有1000张打好标签的图片，且均来自《冰菓》**。（我会把这些数据上传网盘，初步也有扩大这一数据库的想法，毕竟1000张太少了，且人物来源单一，**如果把常见的动漫人物都做一下感觉是个庞大的工程，总之看后续心情慢慢来做，也欢迎有相同兴趣（闲的蛋疼。。。）的同志一起帮忙**)     \n \n 数据准备和训练的全过程不在此处详细介绍，All_process.ipynb文件记录了本文准备+训练过程的所有步骤，下载后可以用jupyter notebook打开并可以直接运行，文件内容如下：[**数据准备+训练全过程**](https://github.com/Threebody-Fan/animate-character-detection/blob/master/All_process.ipynb)。    \n由于篇幅原因，数据集没有上传至github（后面有网盘链接），关于如何准备自己的数据集也可以参考此文献（本文的训练过程基本按照该文献的步骤实现的）：[如何用SSD训练自己的数据集](https://blog.csdn.net/weixin_39881922/article/details/80569803).  \n训练过程相对复杂，要根据自己的数据做很多参数修改，同时为了训练又快又好，又需要调整很多参数，总之很繁琐！另外注意**所有涉及文件路径的都要改为自己的实际路径。**  \n由于训练比较耗时间，建议第一次跑把步数调低一点，跑通之后，在调高训练步数。本文用的GPU是GTX1050，跑100000步花了一个晚上（约5~8小时，用笔记本跑的话建议做好散热工作），具体视GPU性能以及训练设置的参数而定。不太建议用CPU来跑。\n\n## 效果预览\n**测试程序在notebooks文件夹里，用jupyter notebook去打开那个.ipynb文件。测试图片放在demo文件夹里，也可以自行下载一些图片放进去测试**。  \n下面是训练好的模型检测的效果。\n总的来说，可能还是数据量比较小，女主的识别率较高，男主次之，男二女二最少。此外，找了一些其他动漫的角色，也有出现误判的情况。一些检测效果如下所示：  \n先来看一些相对较好的识别效果：  \n![识别效果](https://github.com/Threebody-Fan/animate-character-detection/blob/master/img1.bmp)  \n没什么好说的，单人多人基本都识别出来了，框也画的比较对，就是置信率不太高（女主80左右，男主60左右）。     \n  \n 再来看一些识别错误的图片：  \n![识别效果](https://github.com/Threebody-Fan/animate-character-detection/blob/master/img2.bmp)   \n主要有两种：人物识别不了和人物识别错了。注意图3，5里的角色都没有出现在训练集里，也被当成千反田识别出来了（图3可能是由于京都脸，图5可能是由于水手服）\n，且置信率还不低；此外图1错的有点不能理解。。。\n## 数据集\n如前文所述，将训练用的打好标签的图片上传至网盘：[网盘分享]()提取码：[     ]。  \n(注：不打算自己训练的话不用下数据集，下载训练好的模型文件就可以测试看看效果了)  \n目前只有《冰菓》的数据，且只有1000张。感觉目前二次元文化毕竟不是主流，ImageNet上并没有这种类别的图片数据，作为二次元和机器学习的两者的爱好者，有必要搞一波二次元图片数据库，希望能把这个数据库不断扩大，也欢迎有同样兴趣的小伙伴加入(打标签工具：[LabelImg](https://github.com/tzutalin/labelImg))，当然，如果能找到现成的数据库就更好了，毕竟打标签真的费眼睛。。。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwufan-tb%2Fanimate-character-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwufan-tb%2Fanimate-character-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwufan-tb%2Fanimate-character-detection/lists"}