Giter Site home page Giter Site logo

scheckmedia / photils-cli Goto Github PK

View Code? Open in Web Editor NEW
42.0 7.0 5.0 193.68 MB

photils-cli is an application that passes an image through a neural network, classifies it, and extracts the suggested tags. Everything happens offline without the need that your data are sent over the internet.

License: GNU General Public License v3.0

CMake 23.98% C++ 64.67% Shell 10.52% C 0.83%
image image-processing autotagging keywords tensorflow tensorflow-lite tflite cli darktable

photils-cli's Introduction

photils-cli

Build Status

Photils-cli is an application that passes an image through a neural network, classifies it, and extracts the suggested tags. Everything happens offline without the need that your data are sent over the internet.

The reason for this application is mainly the integration into darktable as plugin.

Installation

Linux

  1. Download the latest release photils-cli-VERSION-linux.zip
  2. Copy the photils-cli.AppImage at some safe pleace
  3. Make the AppImage executable: https://youtu.be/nzZ6Ikc7juw

MacOS

  1. Download the latest release photils-cli-VERSION-osx.zip
  2. Extract the zip and copy the photils-cli.app at some safe place

Windows

  1. Download the latest release photils-cli-VERSION-win64.zip
  2. Extract the zip and copy the content of the zip at some safe place

Usage

Linux:

$ ./photils-cli.AppImage --image ~/Pictures/_DSC2437.jpg

MacOS:

$ ./photils-cli.app/Contents/MacOS/photils-cli --image ~/Pictures/_DSC2437.jpg

Windows:

$ .\photils-cli.exe --image C:\Documents\somepic.jpg

Args

photils-cli [OPTION...]

  -h, --help             print this help
  -v, --version          print version
  -i, --image arg        Image to predict keywords
  -o, --output_file arg  File where to write keywords. Optional (default: "")
  -c, --with_confidence  If flag is used a confidence value for each
                         prediction is printed as well. Optional

Tag translation

photils comes with a fixed list of ~3700 available tags. In some cases, the language or space-less tag style does not fit your workflow. For such cases, you have the option to override tags with your own style. For example, if you don't like the blackbackground tag and want black background instead, you can user the override file to fix this. You can also use it to translate the tags to the language of your choice.

All what you need is to place a file named override_labels.json in the folder:

OS Path
MacOS $HOME/Library/Application Support/photils/override_labels.json
Linux $HOME/.local/share/photils/override_labels.json
Windows %userprofile%\.local\share\photils\override_labels.json

with a structure like:

{
  "tag_name": "new_tag_name"
}

For example, a simple translation into German of 4 tags looks like this:

{
    "art": "kunst",
    "shadow": "schatten",
    "light": "licht",
    "blackbackground": "schwarzer hintergrund"
}

If you have done a translation of the available tags, please share it with us for the community. Thanks!

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GPLv3

photils-cli's People

Contributors

scheckmedia avatar sjjh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

photils-cli's Issues

Release does not support label override

Thank you very much for this utility.

The linux appimage release does not include the label override feature. I compiled a new appimage from the latest source and the feature worked.

Thanks again.

German Translation

Hi,

Not a real isssue....
at the moment i am translating the labels.json in to German Tags/Schlagworte as a override_labels.json.
Usage described here:
https://github.com/scheckmedia/photils-cli

At the moment the file contains 1450 translations.

I am not sure if this is the right place to upload this file.

Cheers
Ralf

Get rid of tflite

Since building tflite is not that easy, especially for windows, the model should be in onnx format. As consequence opencvs dnn lib can be used for inference. There is no benefit, except the file size, using tflite on desktop environments.

WIN10 setup

Hi, I wanted to try the photils darktable plugin and downloaded the windows release for that. Unfortunately it only contain the file photils.onnx in share/photils/, while the bin/ directory in the zip is empty.
Thanks a lot and kind regards,
Erik

The Appimage doesn't work on debian (buster)

Hello,

I wanted to try your tool on debian, but I got the following error :

photils-cli: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by photils-cli)
photils-cli: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /tmp/.mount_photiltxG9hA/usr/bin/../lib/libopencv_imgcodecs.so.4.3)
photils-cli: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /tmp/.mount_photiltxG9hA/usr/bin/../lib/libopencv_core.so.4.3)

Show help, when run without arguments

It is a good practice in most command line programs to show the help, when run without arguments.

photils-cli-linux-x86_64.AppImage

Should show the same then:

photils-cli-linux-x86_64.AppImage --help

TAG translation in French

Hello,

I have made good progress on a translation of TAG into French.

I think it will be well refined and sufficiently reviewed in a few days, so that I will be able to submit it to you for sharing with the community.

Could you please let me know how to submit it to you?

Batch tagging files via command line / multiple formats

Is it possible to use command line to auto-tag entire folders with e.g. the first 10 recognised tags? The Tags should be written directly into the original file. If so, is there a possibility to batch-tag also HEIC-images / other formats? That would be great to save time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.