Closed red-tails closed 3 years ago
Most of the time on startup is model (hundreds of MB) loading time. Currently, DeepDanbooru does not have built-in method for keeping model in memory. But you can make your own evaluation app by using DeepDanbooru's API.
See https://github.com/KichangKim/DeepDanbooru/blob/master/deepdanbooru/commands/evaluate.py
Not an issue, but a question.
Single image:
time deepdanbooru evaluate /mnt/f/deepdanbooru/sample-460c5595dcf9b07d58f951d349202d98.jpg --model-path /mnt/f/deepdanbooru/deepdanbooru-v3-20200915-sgd-e30.zip/model-resnet_custom_v3.h5 --tags-path /mnt/f/deepdanbooru/deepdanbooru-v3-20200915-sgd-e30.zip/tags.txt --verbose --threshold 0.500 --no-compile
real 0m19.199sFolder with 14 images:
time deepdanbooru evaluate /mnt/f/deepdanbooru/1/ --model-path /mnt/f/deepdanbooru/deepdanbooru-v3-20200915-sgd-e30.zip/model-resnet_custom_v3.h5 --tags-path /mnt/f/deepdanbooru/deepdanbooru-v3-20200915-sgd-e30.zip/tags.txt --verbose --threshold 0.500 --no-compile --allow-folder
real 0m29.276sSeems that actual recognition only takes 1 sec/image. But startup takes 20 seconds.
Is there a way to speed this up, or keep deepdanbooru running?