Commit Graph

8 Commits

Author SHA1 Message Date
evazion d43ce9c4e7 autotag: add option for taking list of files from a text file.
Add an option for taking the list of input files from a text file:

  ./autotag -i files.txt

This is useful in conjunction with the `find` command:

  find ~/images/ -name '*.jpg' | ./autotag -i -
2022-06-22 17:16:22 -05:00
evazion e598c7de16 autotag: add CSV output mode. 2022-06-22 16:34:34 -05:00
evazion 0648b529d0 autotag: allow outputting filename without path or extension.
This is useful when performing batch inference on the Danbooru dataset.
In this case the filename is the MD5, so this makes the output return
only the MD5 instead of the full path to the image file.
2022-06-22 16:12:46 -05:00
evazion 96b6a12924 autotag: accept files from stdin with '-'.
Fix `autotag` so you can pass a filename of '-' to read a file from
stdin. This way you can do this:

  docker run --rm -i ghcr.io/danbooru/autotagger autotag - < image.jpg

...to perform prediction on a single file outside of Docker.
2022-06-22 15:25:48 -05:00
dokutan 22e1f2be7d Fix AttributeError 2022-06-22 20:11:46 +02:00
evazion a4db87e8a0 autotag: allow recursively processing directories.
* Make it so you can give the `autotag` script a mixed list of files and
  directories, and it will recursively process every file in each directory.

* Allow choosing the output format: one (filename, tag, score) tuple per
  line, or one (filename, tags) tuple per line.
2022-06-22 04:54:12 -05:00
evazion 07b84d73fe Do batch prediction.
Do batch prediction inside the `predict` method instead of calling
`predict` once for each image.
2022-06-21 20:08:49 -05:00
evazion 55d343cd3d Initial commit. 2022-06-20 23:33:54 -05:00