Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to output the result to txt? #90

Open
Cdanzhi opened this issue Mar 29, 2023 · 3 comments
Open

How to output the result to txt? #90

Cdanzhi opened this issue Mar 29, 2023 · 3 comments

Comments

@Cdanzhi
Copy link

Cdanzhi commented Mar 29, 2023

I deployed the project locally, but after I used ‘deepdanbooru evaluate.......’, I found that the result was just printed in cmd. How to save the results separately as the corresponding txt file for each picture?

Thank you very much!

@Jena8765
Copy link

Jena8765 commented Apr 3, 2023

If you have GIT you can open a git bash instead of a cmd window and run the command
deepdanbooru evaluate [image_file_path or folder] --project-path [your_project_folder] --allow-folder | tee -a output_$(date +'%Y-%m-%d_%H-%M-%S').txt
and it will output in the bash window and a time stamped text file but it saves every output into a single text file though it does sort within that one text file, it isn't hard to write a code that can take that one text file and split it into many but as far as I know outside of editing DeepDanbooru code there isn't a way to do it directly

@kamuridesu
Copy link

If you have GIT you can open a git bash instead of a cmd window and run the command deepdanbooru evaluate [image_file_path or folder] --project-path [your_project_folder] --allow-folder | tee -a output_$(date +'%Y-%m-%d_%H-%M-%S').txt and it will output in the bash window and a time stamped text file but it saves every output into a single text file though it does sort within that one text file, it isn't hard to write a code that can take that one text file and split it into many but as far as I know outside of editing DeepDanbooru code there isn't a way to do it directly

Why??? you can just pass --save_txt to evaluate and it generates a .txt to each file!

@soleilvermeil
Copy link

soleilvermeil commented Sep 30, 2023

You can indeed add --save-txt (note the dash, not an underscore) to your command, which will create a file with the same name as your image (but with .txt obviously) containing its tags. For the moment only the tags are saved; the confidence of each tag is lost during the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants