Code Monkey home page Code Monkey logo

image-annotator-rust's Introduction

Key Features

Note: I'm actively working on this app's first release. Please hop on to the issues page if you would like to contribute.

  1. Select folder with images to mark annotated images.
  2. Zoom (like pinch zoom) and pan images in the view.
  3. Options available: Mark as Correct, Mark as Incorrect, Reset Selection.
  4. Export as a JSON file.
  5. The JSON file can retain previously annotated folders.
  6. See the info (track current image path, folder path, total files etc.) in the window itself.
  7. Invalid files are ignored, and a proper text is shown instead of the image viewer.
  8. Any sub-directories in the selected folder are ignored.
  9. Image file sizes are retained, and the app is scrollable + resizable.
  10. Binaries are available for Windows, OSX and Linux, here.
  11. Built 100% with Rust, GUI built using Iced library

Description and Demo

Theme Switching

The app saves you some eye strain with dark and light theme switching option.

Screenshot from 2023-01-29 12-54-20

Welcome page - select your folder

image

  • Any sub-folders present in the selected folder will be ignored.
  • File validation is done while traversing through the folder, to save time.

Verify annotation

image

  • Option to mark as correct/incorrect or reset selection.
  • Click Export to export the results to a JSON file. (output.json in the folder where you started the app from)
  • Mark as Incorrect will have an option to add comments (optional)

Invalid file

invalid_file

  • In case a file is invalid, or the image couldn't be loaded, a message will appear and a user can see the file path in the info below to the text.

Add comments (optional)

output_annotation

Output

A sample output is given here

{
  "image_to_properties_map": {
    "/home/krshrimali/Documents/Projects/rust/image-annotator-rust-app/sample_folder": [
      {
        "index": 0,
        "image_path": "/home/krshrimali/Documents/Projects/rust/image-annotator-rust-app/sample_folder/invalid_file.txt",
        "annotation": null,
        "comments": null,
        "last_updated": "2023-02-05 12:53:28.343688759 +05:30"
      },
      {
        "index": 1,
        "image_path": "/home/krshrimali/Documents/Projects/rust/image-annotator-rust-app/sample_folder/sample.webp",
        "annotation": null,
        "comments": null,
        "last_updated": "2023-02-05 12:53:28.343921942 +05:30"
      },
      {
        "index": 2,
        "image_path": "/home/krshrimali/Documents/Projects/rust/image-annotator-rust-app/sample_folder/nature-3082832__480.jpg",
        "annotation": null,
        "comments": null,
        "last_updated": "2023-02-05 12:53:28.343935682 +05:30"
      }
    ]
  }
}

Build from source

If you are on Linux, following libraries are required:

  1. Rust toolchain, see: this for instructions.
  2. cmake, pkg-config, fontconfig.
  3. OpenSSL 3.0
  4. libgtk-3-dev (GTK 3.0 dev libraries)

Once done, follow the instructions below:

# Build porject
cargo build
# Build binary for release
cargo build --release
# Run the app
cargo run

image-annotator-rust's People

Contributors

krshrimali avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

duongtrieu

image-annotator-rust's Issues

Add last updated timestamp to property

Currently, the format looks like:

{
  "image_to_properties_map": {
    "/Users/krshrimali/Documents/krshrimali/projects/image-annotator-rust-app/sample_folder": [
      {
        "index": 0,
        "image_path": "/Users/krshrimali/Documents/krshrimali/projects/image-annotator-rust-app/sample_folder/sample.webp",
        "annotation": true,
        "comments": ""
      },
    ],
  }
}

After this issue is resolved, it should look like:

{
  "image_to_properties_map": {
    "/Users/krshrimali/Documents/krshrimali/projects/image-annotator-rust-app/sample_folder": {
      "last_updated": "time_stamp_as_str",
      "annotations": [
        {
          "index": 0,
          "image_path": "/Users/krshrimali/Documents/krshrimali/projects/image-annotator-rust-app/sample_folder/sample.webp",
          "annotation": true,
          "comments": ""
        }
      ]
    },
  }
}

Improve UI

Currently, it's hard to differentiate b/w the rows, so it would be good to add some colors into it.

Test backend logic

Currently, the app lacks any tests for the backend. Ideally, we should test logics like:

  1. Raising proper errors for invalid files (invalid extensions/invalid images etc.)
  2. Loading an image from local path.
  3. Checking empty folder.
  4. Mark as correct and mark as incorrect.
  5. JSON Writer

And more.

Load images asynchronously to avoid delay

It's possible that images will be huge in size - and loading each image will take a lot of time while traversal. It will be ideal if images are loaded in the background (async).

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.