GithubHelp home page GithubHelp logo

mfl28 / boundingboxeditor Goto Github PK

View Code? Open in Web Editor NEW
50.0 4.0 8.0 62.4 MB

A JavaFX desktop application for creating image-object-annotations with bounding boxes.

License: GNU General Public License v3.0

Java 94.59% CSS 0.08% Dockerfile 0.04% SCSS 5.24% PowerShell 0.05%
java javafx javafx-desktop-apps image-annotation tools labeling detection image-labeling bounding-boxes annotation-tool

boundingboxeditor's Introduction

Bounding Box Editor Icon
Bounding Box Editor

Build Status Codecov Coverage (master) Quality Gate Status CodeQL Github all releases GitHub Release (latest by date) License

This is an image annotation desktop-application written in Java using the JavaFX application platform. It allows you to create bounding box annotations using rectangular and polygonal shapes. Annotations can be imported and saved from/to JSON files, Pascal VOC format XML-files or YOLO format TXT-files.


Demo screenshot of release v2.0.0.

Main Features

  • Create rectangular and polygonal ("vertices-clicking" and "freehand-drawing" modes) bounding box annotations for objects in images
  • Export and import rectangular and polygonal bounding box annotations to and from JSON and XML files (using Pascal VOC format)
  • Export and import rectangular bounding box annotations using the YOLO format
  • Connect your own Torch Serve prediction endpoint and use bounding box predictions as annotation hints
  • Format validation and error reporting when importing annotations
  • Nest bounding box labels (which is then reflected in the output XML-file if using Pascal VOC format)
  • Easily and swiftly navigate and search the loaded image files via a side-panel with thumbnails
  • Tag bounding boxes using tags defined in the Pascal VOC format (truncated, difficult, occluded, pose: *, action: *)
  • Color-coded, searchable and fully dynamic object categories

Latest Release

GitHub release (latest by date) platform

Download the latest release installer or portable image (no installation required) of Bounding Box Editor for your operating system from the links below. These files were created using the jpackage packaging tool, the Badass JLink Gradle plugin and github-actions.

OS Installer Portable Stats
Linux deb, rpm image GitHub release (latest by SemVer and asset)
macOS dmg image GitHub release (latest by SemVer and asset)
Windows exe image GitHub release (latest by SemVer and asset)

Alternative installation methods

Windows

Chocolatey Version (including pre-releases)

choco install boundingboxeditor

How to use the application

Please refer to the User Manual in the Wiki for a detailed usage guide and presentation (including gifs) of the application's main functions.

Using annotations for object detection

After having created annotations for your images, you can use the saved bounding boxes as ground-truths in the training and evaluation of neural networks in order to perform object-detection tasks. How this can be done for any kind of labeled objects using Python and the Pytorch deep learning library is shown exemplarily in the Humpback Whale Fluke Detection - Jupyter notebook which you can find in my Machine Learning repo.

How to build the application

The project uses Gradle as build-system. You will need to have Gradle version 5+ and a Java JDK version 11+ installed on your system, e.g. from OpenJDK. After cloning the repository into a folder on your machine you may build the application from the root folder by opening a command line and using:

gradlew build # Add "-x test" to skip the UI-tests.

Note: The concrete way of invoking gradlew depends on your OS and used command line:

  • Linux & MacOs: ./gradlew ...
  • Windows:
    • Command Prompt: gradlew ...
    • Powershell: .\gradlew ...

How to run the application

To run the app using Gradle, use:

gradlew run

How to run the tests

The project comes equipped with automatic UI-tests which use TestFX and the JUnit 5 testing frameworks. Due to some used functionality in the implemented tests it is (currently) not possible to run the tests in headless mode.

To run the tests, use :

gradlew test

How to build the latest Linux image and installers using Docker

First build the Docker image from the cloned repo's root directory using:

docker image build -t bbeditor .

Then create a writable container layer over the image (without starting a container):

docker container create --name bbeditor bbeditor

Finally, copy the directory containing the build artifacts to the host:

docker container cp bbeditor:/artifacts .

Alternative:
If you have a recent Docker version that supports BuildKit engine (version >= 19.03) you can do the whole build using a one-line command:

DOCKER_BUILDKIT=1 docker image build --target artifacts --output type=local,dest=. . 

Acknowledgements

License

This project is licensed under GPL v3. See LICENSE.

boundingboxeditor's People

Contributors

kaiwinter avatar m2key1 avatar mfl28 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

boundingboxeditor's Issues

Set progress-dialog owners

  • Progress dialogs windows are currently not assigned an owner window. This can lead to display problems e.g. when running the app in exclusive full-screen mode on macOS.

Fix CI Gradle caching in Windows pipe

  • When the setup-java action tries to cache Gradle files in the Windows CI pipeline, an error is raised because some files are not accessible. This can be fixed using workarounds for the Github cache action mentioned in actions/cache#454.

Allow saving bounding shape cropped images

Is your feature request related to a problem? Please describe.
Allow saving cropped images (based on bounding shape outlines) to disk.

Describe the solution you'd like
Saving should be triggered via a new bounding shape (and treeitem) context menu item.

Describe alternatives you've considered
None.

Additional context
None.

Panning and scrolling does not work correctly (on Ubuntu)

  • As mentioned in #66, panning (and also scrolling) does not work correctly on Ubuntu (22) . The problem is caused by a division by zero when the content- and viewport-pane sizes are exactly equal. This resulted in the scrollpane hvalue and vvalue being set to NaN. This was not caught in unit tests.

Streamline scene key-event handling

  • Streamline scene key-event handling.
  • Introduce single fire events, so that specific key events only trigger once even if the corresponding key-combination is pressed repeatedly.
  • Update image navigation key-shortcuts from A and D to Ctrl-A and Ctrl-D to be more consistent with other shortcuts.

Add polygon freehand-drawing

  • Add freehand polygon-drawing mode. Draw JavaFX Path shapes which are automatically converted to polygons upon drawing completion.
  • It should be possible to remove vertices using a topological simplification algorithm (using jts). For freehand drawn shapes the simplification should optionally (default=on) run automatically when converting freehand drawn paths to polygons. It should also be possible to run simplification on already created polygons.
  • Introduce new EditorSettings settings pane to set the simplification algorithm settings (auto-simplification on/off, simplification tolerance [low->medium->high]).

Remove textfield focus when pressing enter

  • Currently, textfields keep focus when committing input (pressing enter) which can lead to some keystrokes (e.g. Ctrl-A) being unintentionally intercepted. Instead, when pressing the Enter key, focus should be lost on the textfields.

Correctly handle jpeg images with EXIF orientation data

  • EXIF orientation data in jpeg files must be parsed and the images must be correctly oriented based on a EXIF orientation tag (if present).
  • Concerns loading of images in main view, the image file explorer, making prediction-requests and annotation export/import.

Fix drawing-zooming interaction

  • Drawing shapes while also performing image-zooming at the same time results in incorrect shape position updates (even positions outside the image frame are possible).

Requires separate labels/images folders for loading YOLO annotation files

The YOLO format is admittedly a little... loose, but it's pretty typical to have a flat folder in which images and .txt files are side-by-side. Bounding Box Editor appears to require separate folders for labels and images, or at least it strongly expects this.

I like it so much as a preview tool that I work around this by creating folders within my YOLO annotation folder, and filling one folder up with symlinks to all the images, and filling another folder up with symlinks to all the .txt files, but this seems like an extra hoop to jump through to use the standard format.

Any chance Bounding Box Editor could support typical YOLO folders, which look like:

image001.jpg
image001.txt
image002.jpg
image002.txt

Thanks!

Improve macos shortcut handling

  • Improve macos shortcut consistency (use correct platform shortcut command/meta everywhere).
  • Update tests to work on macos (relating to shortcut handling).

Hangs when using keyboard navigation in Linux

First, props on a fantastic tool; this is the fastest, most user-friendly tool I've come cross to load and preview YOLO-formatted annotations.

I am using Ubuntu 22.04, and I can load an image set, and navigate between images with the sidebar and the arrow keys, but when I hit "ctrl-a" or "ctrl-d" to switch between images, the image number indicator advances correctly, but I just get a permanent spinning wheel.

Nothing happens in the console when I hit the shortcut key; the only thing I see in the console is a warning from just after loading the images, which may or may not be relevant:

(BoundingBoxEditor:2673766): Gdk-WARNING **: 16:44:00.036: XSetErrorHandler() called with a GDK error trap pushed. Don't do that.

"Hangs" may be a little misleading... the app is still responsive, the image just never loads, and clicking on other images (or the arrow keys) no longer loads images.

Thoughts?

Thanks!

Add help and program version info

  • The app should contain a "Help" menu with links to the documentation and a button showing an about dialog with the current program version.
  • The program version should also be shown in the app window title.

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.