自动打标

自动打标

自动打标 自动打标 Modified July 15, 2024 TagTool With Ollama打标 Win编辑run win.ps1文件,Mac编辑run mac.sh文件,将目录中的图片路径和触发词填写,运行即可(小白用户请不要修改其他内容) Code block Bash Copy !/bin/bash 在这里填写图片目录路径、API URL和模型名称 IMAGE DIRECTORY="/Users/simplemin/Desktop/imgtest" API URL="http://127.0.0.1:11434/api/chat" MODEL="llava" 模型触发词,会添加在标签的最前面,如果不填则不添加 TRIGGER="trigger word" 这里是打标用的prompt,不建议修改 PROMPT="You are an expert in image tagging. You can tag the images I provide very accurately to enhance the CLIP model's understanding of the content. The higher the quality, the higher the bonus points, so please finish the task as high as possible. The following rules should be observed during the tagging process: 1. Tags should be described with concise keywords or phrases, avoiding sentences; 2. Need to accurately describe the content of the picture, including but not limited to object shape, picture style, filter, lens specifications, composition; 3. If the subject of the image is a character, it is necessary to describe the character, including but not limited to the character's image, clothing, posture and facial expressions; 4. If the image contains well known buildings, characters, animation and other content, it needs to be correctly identified and tagged; 5. Tags should be accurate to avoid duplication or irrelevant content; 6. Tags should be as simple as possible to avoid complexity and repetition; 7. Tags need to be sorted by relevance and priority. The main content and tags with high priority in the picture are placed in the front, and the content with low priority is placed in the back; 8. The number of tags should be within 75 words, and each label should be separated by commas; 9. The closer the tag description is to the picture, the higher the quality." 激活虚拟环境 source venv/bin/activate 运行 main.py 脚本 python3 main.py "$IMAGE DIRECTORY" "$API URL" "$MODEL" "$TRIGGER" "$PROMPT" 取消虚拟环境激活 deactivate GPT4V打标工具 请参考作者的视频教程: https://www.bilibili.com/video/BV1pw411g7X1/?buvid=XXE2386E9E35E1E202FC76CCA683895F5224E&from spmid=main.space.0.0&is story h5=false&mid=8VilieHQhcyjAE%2BnC9FDpn8FTQ%2FSZMtL1rElX6M3iMo%3D&p=1&plat id=116&share from=ugc&share medium=android&share plat=android&share session id=d8b92fdb 20e9 40dc a403 069ec9120c30&share source=WEIXIN&share tag=s i&spmid=united.player video detail.0.0&timestamp=1704965573&unique k=5G6kW7O&up id=3546603772185139 【作者自荐】超棒的SD图像打标&处理工具:GPT4 V Image Captioner 哔哩哔哩 bilibili 欢迎大家使用GPT4 V Image Captioner。该项目的Github主页:https://github.com/jiayev/GPT4V Image Captioner无法登录Github的同学可以在此处下载安装包:https://www.liblib.art/modelinfo/936dac7e9dc84e9081f6f0f20d57923f该工具由Jiaye、我、Sleeepy Zh WD1.4 TagTool With Ollama打标 Win编辑run win.ps1文件,Mac编辑run mac.sh文件,将目录中的图片路径和触发词填写,运行即可(小白用户请不要修改其他内容) Code block Bash Copy !/bin/bash 在这里填写图片目录路径、API URL和模型名称 IMAGE DIRECTORY="/Users/simplemin/Desktop/imgtest" API URL="http://127.0.0.1:11434/api/chat" MODEL="llava" 模型触发词,会添加在标签的最前面,如果不填则不添加 TRIGGER="trigger word" 这里是打标用的prompt,不建议修改 PROMPT="You are an expert in image tagging. You can tag the images I provide very accurately to enhance the CLIP model's understanding of the content. The higher the quality, the higher the bonus points, so please finish the task as high as possible. The following rules should be observed during the tagging process: 1. Tags should be described with concise keywords or phrases, avoiding sentences; 2. Need to accurately describe the content of the picture, including but not limited to object shape, picture style, filter, lens specifications, composition; 3. If the subject of the image is a character, it is necessary to describe the character, including but not limited to the character's image, clothing, posture and facial expressions; 4. If the image contains well known buildings, characters, animation and other content, it needs to be correctly identified and tagged; 5. Tags should be accurate to avoid duplication or irrelevant content; 6. Tags should be as simple as possible to avoid complexity and repetition; 7. Tags need to be sorted by relevance and priority. The main content and tags with high priority in the picture are placed in the front, and the content with low priority is placed in the back; 8. The number of tags should be within 75 words, and each label should be separated by commas; 9. The closer the tag description is to the picture, the higher the quality." 激活虚拟环境 source venv/bin/activate 运行 main.py 脚本 python3 main.py "$IMAGE DIRECTORY" "$API URL" "$MODEL" "$TRIGGER" "$PROMPT" 取消虚拟环境激活 deactivate GPT4V打标工具 请参考作者的视频教程: https://www.bilibili.com/video/BV1pw411g7X1/?buvid=XXE2386E9E35E1E202FC76CCA683895F5224E&from spmid=main.space.0.0&is story h5=false&mid=8VilieHQhcyjAE%2BnC9FDpn8FTQ%2FSZMtL1rElX6M3iMo%3D&p=1&plat id=116&share from=ugc&share medium=android&share plat=android&share session id=d8b92fdb 20e9 40dc a403 069ec9120c30&share source=WEIXIN&share tag=s i&spmid=united.player video detail.0.0&timestamp=1704965573&unique k=5G6kW7O&up id=3546603772185139 【作者自荐】超棒的SD图像打标&处理工具:GPT4 V Image Captioner 哔哩哔哩 bilibili 欢迎大家使用GPT4 V Image Captioner。该项目的Github主页:https://github.com/jiayev/GPT4V Image Captioner无法登录Github的同学可以在此处下载安装包:https://www.liblib.art/modelinfo/936dac7e9dc84e9081f6f0f20d57923f该工具由Jiaye、我、Sleeepy Zh https://www.bilibili.com/video/BV1pw411g7X1/?buvid=XXE2386E9E35E1E202FC76CCA683895F5224E&from spmid=main.space.0.0&is story h5=false&mid=8VilieHQhcyjAE%2BnC9FDpn8FTQ%2FSZMtL1rElX6M3iMo%3D&p=1&plat id=116&share from=ugc&share medium=android&share plat=android&share session id=d8b92fdb 20e9 40dc a403 069ec9120c30&share source=WEIXIN&share tag=s i&spmid=united.player video detail.0.0&timestamp=1704965573&unique k=5G6kW7O&up id=3546603772185139 【作者自荐】超棒的SD图像打标&处理工具:GPT4 V Image Captioner 哔哩哔哩 bilibili 欢迎大家使用GPT4 V Image Captioner。该项目的Github主页:https://github.com/jiayev/GPT4V Image Captioner无法登录Github的同学可以在此处下载安装包:https://www.liblib.art/modelinfo/936dac7e9dc84e9081f6f0f20d57923f该工具由Jiaye、我、Sleeepy Zh WD1.4

在 小宇宙note 阅读完整内容