애니메이션 스타일 이미지의 태그 예측 시스템.
https://autotagger.donmai.us에서 시도하십시오.
또는 https://danbooru.donmai.us/ai_tags로 이동하여 Danbooru의 모든 게시물에서 예측 된 태그를 찾아보십시오. 다음은 다른 태그의 몇 가지 예입니다.
https://danbooru.donmai.us/ai_tags?seargure=core_desc
https://danbooru.donmai.us/ai_tags?seargure=Hatsune_Miku&search= ]=Score_desc
https://danbooru.donmai.us/ai_tags?seargue=Cat&search= ]=Score_desc
# Get tags for a single image cat image.jpg | docker run --rm -i ghcr.io/danbooru/autotagger autotag - # Run the web server. Open http://localhost:5000. docker run --rm -p 5000:5000 ghcr.io/danbooru/autotagger # Get tags from the web server. curl http://localhost:5000/evaluate -X POST -F file=@hatsune_miku.jpg -F format=json
앱 서버 시작 :
# dockerdocker run과 함께 -rm -p 5000 : 5000 ghcr.io/danbooru/autoTagger# dockerpython -m시를 run gunicorn
그런 다음 http : // localhost : 5000을 엽니 WebApp을 사용하십시오. 여기에서 이미지를 업로드하고 예측 된 태그 목록을 볼 수 있습니다.
위와 같이 앱 서버를 시작한 다음 다음과 같이하십시오.
curl http : // localhost : 5000/평가 -x post -f file=@hatsune_miku.jpg -f format = json
출력은 다음과 같습니다.
[의 뜻 { "filename": "Hatsune_miku.jpg", "태그": { "1girl": 0.9995526671409607, "Hatsune_miku": 0.9995216131210327, "보컬" , "Thighhighs": 0.970325767993927, "long_hair": 0.96303335569381714, "twintails": 0.9352861046791077, "very_long_hair": 0.8532902002002334595, "Necktie": 0.853278945602417, "aq EVES ": 0.796751081943512,"스커트 ": 0.7879447340965271,"등급 : S ": 0.7843148112297058,"Aqua_eyes ": 0.6136178374290466, "Zettai_ryouiki": 0.5611224174499512, "thigh_boots": 0.37453025579452515, "black_legwear": 0.372512325767024, "0.33261313 _background ": 0.28789788484573364,"부츠 ": 0.286143958568573,"헤드셋 ": 0.27902844448225403,"White_background ": 0.2344151282709503, "셔츠": 0.21720334887504578, "looking_at_viewer": 0.2044636756181717, "pleated_skirt": 0.17705336213111877, "Smile": 0.175736153168, "0.174904": " , "헤드폰": 0.16347116231918335, "스탠딩": 0.15511766076087952, "등급 : g": 0.13711321353912354, "aq } ]]
단일 이미지의 태그 생성 :
# docker와 함께 : cat image.jpg | Docker Run ---RM GHCR.IO/DANBOORU/AUTOTAGGER AUTOTAG-# Docker : ./ Autotag image.jpg
여러 이미지에 대한 태그 생성 :
# docker with :#`-v $ pwd :/host`은 docker 컨테이너 내부의/호스트로 현재 디렉토리를 마운트한다 -rm -v $ pwd :/host ghcr.io/danbooru/autogger autotag/host/ image1.jpg/host/image2.jpg# docker : ./ autotag image1.jpg image2.jpg
images/
디렉토리 내부의 모든 이미지에 대한 태그 생성 :
# docker with docker :# 이미지 디렉토리가 무엇이든``이미지 ''를 변경합니다 .docker run -rm -v $ pwd/images :/images ghcr.io/danbooru/autotagger autotag/images# docker : ./ 자동 태그 이미지//
패턴과 일치하는 디렉토리 내부의 모든 파일에 대한 태그를 생성합니다.
이미지/ -name '*.jpg'| ./autotag -i-
Danbooru 인스턴스로 가져 오기에 적합한 CSV 형식의 태그 목록을 생성하십시오.
./autotag -c -f -n 이미지/ | gzip> tags.csv.gz
# Install system dependencies apt-get update apt-get install git build-essential gfortran libatlas-base-dev libffi-dev libssl-dev libbz2-dev liblzma-dev # Get code git clone https://github.com/danbooru/autotagger.git cd autotagger # Install Python (skip this if Python 3.9.13 is already installed) git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.0 echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc exec bash asdf plugin add python asdf install python 3.9.13 asdf shell python 3.9.13 # Install Python dependencies pip install poetry==1.1.13 python -m poetry env use 3.9 python -m poetry install --no-dev # Download latest model wget https://github.com/danbooru/autotagger/releases/download/2022.06.20-233624-utc/model.pth -O models/model.pth # Test that it works ./autotag test/hatsune_miku.jpg
현재 모델은 Stock Resnet-152이며, ImageNet에서 사전에 사전 후 Danbooru에서 약 10 개의 에포크를 위해 미세 조정했습니다.
이 모델은 약 5500 개의 태그로 교육을받습니다. 여기에는> 750 개의 게시물이있는 문자 태그,> 2000 개의 게시물이있는 저작권 태그 및> 2500 개의 게시물이 있지만 아티스트 또는 메타 태그가없는 일반 태그가 포함됩니다. 등급도 포함됩니다.
이 모델은 https://github.com/danbooru/autotagger/releases에서 제공됩니다.
https://github.com/kichangkim/deepdanbooru
https://github.com/smilingwolf/sw-s-cv-modelzoo
https://github.com/zyddnys/regdeepdanbooru
https://github.com/rezoo/illustration2vec
https://www.gwern.net/danbooru2021
https://console.cloud.google.com/storage/browser/danbooru_public/data?project=danbooru1 (Danbooru 데이터 덤프)