# xiaoxile **Repository Path**: oldprincess/xiaoxile ## Basic Information - **Project Name**: xiaoxile - **Description**: 基于动漫人脸识别的贴图脚本,能够给动漫人脸的嘴部贴上预设的图片。xiaoxile(笑嘻了) - **Primary Language**: Python - **License**: CC-BY-SA-4.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-04-29 - **Last Updated**: 2024-06-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # xiaoxile #### 介绍 基于动漫人脸识别的贴图脚本,能够给动漫人脸的嘴部贴上预设的图片。xiaoxile(笑嘻了) ![pic](./pic-xiaoxile.jpg) #### 文件说明 |文件|说明| |-|-| |xiaoxile.py|主要功能实现| |demo.py|调用样例| |smile.png|笑脸贴图| |pic.jpg|测试图片| |pic-xiaoxile.jpg|效果图| #### 安装教程 需要预先安装库`Anime Face Detector` ```python pip install anime-face-detector ``` 这个库安装前需要下载许多依赖库,例如`torch`,`opencv-python`等等,所以可能会有些久 #### 使用说明 ```python """ demo.py """ import xiaoxile import cv2 img = cv2.imread('pic.jpg') # your pic img2 = xiaoxile.paste_smile(img) cv2.imshow('', img2) cv2.waitKey() ``` 如果第一次使用,会自动下载需要的 model 文件`mmdet_anime-face_yolov3.pth`和`mmpose_anime-face_hrnetv2.pth` #### 相关链接 https://pypi.org/project/anime-face-detector/ #### 个人博客 https://www.cnblogs.com/kentle/p/16208480.html