├── aibu_screencast.gif
├── src
└── si
│ └── vicos
│ └── annotations
│ ├── editor
│ ├── changes.txt
│ ├── splash.png
│ ├── icon-16.png
│ ├── icon-64.png
│ ├── annotation.ttf
│ ├── fontawesome.ttf
│ ├── AnnotationRenderer.java
│ ├── tracking
│ │ ├── ImagesProvider.java
│ │ ├── RectangleAnnotationRenderer.java
│ │ ├── BackgroundFigure.java
│ │ ├── TextExporter.java
│ │ ├── InterpolationAssistant.java
│ │ ├── ValuePlot.java
│ │ ├── TransferableAnnotations.java
│ │ ├── FrameTagsEditor.java
│ │ ├── PolygonAnnotationRenderer.java
│ │ ├── UndoableAnnotatedSequence.java
│ │ └── TagPlot.java
│ ├── aibu.ini
│ ├── defaults.ini
│ ├── ThumbnailRenderer.java
│ ├── annotation.ini
│ ├── general.ini
│ ├── ApplicationExceptionHandler.java
│ ├── ToolbarToggleButton.java
│ ├── ImageCache.java
│ ├── AnnotationViewer.java
│ ├── FontImageProvider.java
│ ├── AnnotationsDocumentRenderer.java
│ ├── AnnotationEditor.java
│ ├── ToggleAction.java
│ ├── AnnotatedImageFigure.java
│ ├── ThumbnailGenerator.java
│ ├── AnnotatorSplash.java
│ ├── Interpolator.java
│ ├── ThumbnailGridList.java
│ ├── PointAnnotationEditor.java
│ ├── RectangleAnnotationEditor.java
│ ├── Annotator.java
│ └── RotatedRectangleAnnotationEditor.java
│ ├── SituatedAnnotation.java
│ ├── tracking
│ ├── AnnotationList.java
│ ├── AnnotatedSequenceListener.java
│ ├── Annotations.java
│ ├── CodeAnnotation.java
│ ├── Interval.java
│ ├── AbstractAnnotatedSequence.java
│ ├── ReversedAnnotationsProxy.java
│ ├── Values.java
│ ├── Trajectory.java
│ └── Tags.java
│ ├── ShapeAnnotation.java
│ ├── AnnotationsMetadata.java
│ ├── Context.java
│ ├── Utils.java
│ ├── LabelAnnotation.java
│ ├── PointAnnotation.java
│ ├── PolygonAnnotation.java
│ ├── Annotation.java
│ └── RectangleAnnotation.java
├── .gitignore
├── ivy.xml
└── README.md
/aibu_screencast.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/votchallenge/aibu/HEAD/aibu_screencast.gif
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/changes.txt:
--------------------------------------------------------------------------------
1 | Development release 1
2 | - AVT format prototype
3 | - tracking annotations usability testing
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/votchallenge/aibu/HEAD/src/si/vicos/annotations/editor/splash.png
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/icon-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/votchallenge/aibu/HEAD/src/si/vicos/annotations/editor/icon-16.png
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/icon-64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/votchallenge/aibu/HEAD/src/si/vicos/annotations/editor/icon-64.png
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/annotation.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/votchallenge/aibu/HEAD/src/si/vicos/annotations/editor/annotation.ttf
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/fontawesome.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/votchallenge/aibu/HEAD/src/si/vicos/annotations/editor/fontawesome.ttf
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Mobile Tools for Java (J2ME)
4 | .mtj.tmp/
5 |
6 | # Package Files #
7 | *.jar
8 | *.war
9 | *.ear
10 |
11 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
12 | hs_err_pid*
13 |
14 | build
15 | bin
16 | deploy
17 |
18 | # eclipse project
19 | .project
20 | .classpath
21 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/AnnotationRenderer.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations.editor;
2 |
3 | import java.awt.Graphics2D;
4 |
5 | /**
6 | * The Interface AnnotationRenderer.
7 | */
8 | public interface AnnotationRenderer {
9 |
10 | /**
11 | * Paint.
12 | *
13 | * @param g
14 | * the g
15 | */
16 | public void paint(Graphics2D g);
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/SituatedAnnotation.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations;
2 |
3 | import java.awt.geom.Point2D;
4 |
5 | /**
6 | * The Class SituatedAnnotation.
7 | */
8 | public abstract class SituatedAnnotation extends Annotation {
9 |
10 | /**
11 | * Gets the center.
12 | *
13 | * @return the center
14 | */
15 | public abstract Point2D getCenter();
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/tracking/ImagesProvider.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations.editor.tracking;
2 |
3 | import java.io.File;
4 |
5 | /**
6 | * The Interface ImagesProvider.
7 | */
8 | public interface ImagesProvider {
9 |
10 | /**
11 | * Gets the image.
12 | *
13 | * @param i
14 | * the i
15 | * @return the image
16 | */
17 | public File getImage(int i);
18 |
19 | }
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/aibu.ini:
--------------------------------------------------------------------------------
1 | icon = fa-pencil
2 |
3 | tools-metadata = fa-list
4 | tools-tags = fa-tags
5 |
6 | keyframe = fa-map-marker
7 |
8 | interpolate = fa-expand
9 |
10 | select-start = annotation-select-start
11 | select-end = annotation-select-end
12 |
13 | settings = fa-keyboard-o
14 |
15 | annotations = fa-database
16 | value-tag = fa-tag
17 | value-numerical = fa-line-chart
18 | value-string = fa-font
19 | value-points = fa-map-marker
--------------------------------------------------------------------------------
/src/si/vicos/annotations/tracking/AnnotationList.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations.tracking;
2 |
3 | import si.vicos.annotations.Annotation;
4 |
5 | /**
6 | * The Interface AnnotationList.
7 | */
8 | public interface AnnotationList {
9 |
10 | /**
11 | * Size.
12 | *
13 | * @return the int
14 | */
15 | public int size();
16 |
17 | /**
18 | * Gets the.
19 | *
20 | * @param frame
21 | * the frame
22 | * @return the annotation
23 | */
24 | public Annotation get(int frame);
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/ivy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/ShapeAnnotation.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations;
2 |
3 | import java.awt.geom.Point2D;
4 | import java.util.List;
5 |
6 | /**
7 | * The Class ShapeAnnotation.
8 | */
9 | public abstract class ShapeAnnotation extends SituatedAnnotation {
10 |
11 | /**
12 | * Gets the bounding box.
13 | *
14 | * @return the bounding box
15 | */
16 | public abstract RectangleAnnotation getBoundingBox();
17 |
18 | /**
19 | * Gets the polygon.
20 | *
21 | * @return the polygon
22 | */
23 | public abstract List getPolygon();
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/defaults.ini:
--------------------------------------------------------------------------------
1 | tracking.keybindings.previous = LEFT
2 | tracking.keybindings.next = RIGHT
3 | tracking.keybindings.previous_keyframe = ctrl LEFT
4 | tracking.keybindings.next_keyframe = ctrl RIGHT
5 | tracking.keybindings.first = shift ctrl LEFT
6 | tracking.keybindings.last = shift ctrl RIGHT
7 | tracking.keybindings.reset = DELETE
8 | tracking.keybindings.save = ctrl S
9 | tracking.keybindings.quit = shift ctrl Q
10 | tracking.keybindings.select_start = shift A
11 | tracking.keybindings.select_end = shift S
12 | tracking.keybindings.undo = ctrl Z
13 | tracking.keybindings.redo = ctrl shift Z
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/ThumbnailRenderer.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations.editor;
2 |
3 | import java.awt.image.BufferedImage;
4 |
5 | /**
6 | * The Interface ThumbnailRenderer.
7 | */
8 | public interface ThumbnailRenderer {
9 |
10 | /**
11 | * Render.
12 | *
13 | * @param obj
14 | * the obj
15 | * @return the buffered image
16 | */
17 | public BufferedImage render(Object obj);
18 |
19 | /**
20 | * Gets the width.
21 | *
22 | * @return the width
23 | */
24 | public int getWidth();
25 |
26 | /**
27 | * Gets the height.
28 | *
29 | * @return the height
30 | */
31 | public int getHeight();
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/annotation.ini:
--------------------------------------------------------------------------------
1 | annotation-play=annotation:\ue385
2 | annotation-pause=annotation:\uea1d
3 | annotation-last=annotation:\uea22
4 | annotation-reverse=annotation:\uea1c
5 | annotation-stop=annotation:\uea1e
6 | annotation-select-end=annotation:\ue603
7 | annotation-first=annotation:\uea21
8 | annotation-next=annotation:\uea24
9 | annotation-forward=annotation:\uea20
10 | annotation-editor-polygon=annotation:\ue600
11 | annotation-select-start=annotation:\ue604
12 | annotation-paint-format=annotation:\ue90c
13 | annotation-editor-rectangle=annotation:\ue601
14 | annotation-previous=annotation:\uea23
15 | annotation-backward=annotation:\uea1f
16 | annotation-editor-rotated-rectangle=annotation:\ue602
17 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/general.ini:
--------------------------------------------------------------------------------
1 |
2 | clear = fa-eraser
3 | execute = fa-cog
4 | view = fa-eye
5 |
6 | zoom-normal = fa-search
7 | zoom-in = fa-search-plus
8 | zoom-out = fa-search-minus
9 | zoom-fit = fa-crosshairs
10 |
11 | pause = fa-pause
12 | resume = fa-play
13 | start = fa-play
14 | play = fa-play
15 | eject = fa-eject
16 | stop = fa-stop
17 |
18 | save = fa-floppy-o
19 | new = fa-file-o
20 | load = fa-folder-o
21 | open = fa-folder-o
22 |
23 | undo = fa-undo
24 | redo = fa-repeat
25 |
26 | quit = fa-power-off
27 | exit = fa-power-off
28 |
29 | remove = fa-times
30 | close = fa-times
31 | cancel = fa-times
32 |
33 | go-previous = annotation-reverse
34 | go-next = annotation-play
35 | go-previous-keyframe = fa-backward
36 | go-next-keyframe = fa-forward
37 | go-first = fa-fast-backward
38 | go-last = fa-fast-forward
--------------------------------------------------------------------------------
/src/si/vicos/annotations/AnnotationsMetadata.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations;
2 |
3 | import java.awt.Image;
4 | import java.util.Set;
5 |
6 | /**
7 | * The Interface AnnotationsMetadata.
8 | */
9 | public interface AnnotationsMetadata {
10 |
11 | /**
12 | * Gets the keys.
13 | *
14 | * @return the keys
15 | */
16 | public Set getKeys();
17 |
18 | /**
19 | * Gets the metadata.
20 | *
21 | * @param name
22 | * the name
23 | * @return the metadata
24 | */
25 | public String getMetadata(String name);
26 |
27 | /**
28 | * Gets the preview image.
29 | *
30 | * @return the preview image
31 | */
32 | public Image getPreviewImage();
33 |
34 | /**
35 | * Gets the preview region.
36 | *
37 | * @return the preview region
38 | */
39 | public Annotation getPreviewRegion();
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/ApplicationExceptionHandler.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations.editor;
2 |
3 | import org.coffeeshop.application.Application;
4 | import org.coffeeshop.log.Logger;
5 |
6 | /**
7 | * The Class ApplicationExceptionHandler.
8 | */
9 | public class ApplicationExceptionHandler implements
10 | Thread.UncaughtExceptionHandler {
11 |
12 | /** The log. */
13 | public Logger log;
14 |
15 | /**
16 | * Instantiates a new application exception handler.
17 | */
18 | public ApplicationExceptionHandler() {
19 |
20 | this.log = Application.getApplicationLogger();
21 |
22 | }
23 |
24 | /*
25 | * (non-Javadoc)
26 | *
27 | * @see
28 | * java.lang.Thread.UncaughtExceptionHandler#uncaughtException(java.lang
29 | * .Thread, java.lang.Throwable)
30 | */
31 | @Override
32 | public void uncaughtException(Thread t, Throwable e) {
33 |
34 | log.report(e);
35 |
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/ToolbarToggleButton.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations.editor;
2 |
3 | import javax.swing.Action;
4 | import javax.swing.JButton;
5 | import javax.swing.JToggleButton;
6 |
7 | /**
8 | * The Class ToolbarToggleButton.
9 | */
10 | public class ToolbarToggleButton extends JToggleButton {
11 |
12 | /** The Constant serialVersionUID. */
13 | private static final long serialVersionUID = 1L;
14 |
15 | /**
16 | * Instantiates a new toolbar toggle button.
17 | *
18 | * @param action
19 | * the action
20 | */
21 | public ToolbarToggleButton(Action action) {
22 | super(action);
23 |
24 | if (action != null
25 | && (action.getValue(Action.SMALL_ICON) != null || action
26 | .getValue(Action.LARGE_ICON_KEY) != null)) {
27 | setHideActionText(true);
28 | }
29 | setHorizontalTextPosition(JButton.CENTER);
30 | setVerticalTextPosition(JButton.BOTTOM);
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/Context.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations;
2 |
3 | import java.awt.Image;
4 | import java.io.File;
5 | import java.io.IOException;
6 |
7 | import javax.imageio.ImageIO;
8 |
9 | /**
10 | * The Class Context.
11 | *
12 | * @param
13 | * the element type
14 | */
15 | public abstract class Context {
16 |
17 | /**
18 | * Gets the image represented by a given UID.
19 | *
20 | * @param entry
21 | * the entry
22 | *
23 | * @return the image or null.
24 | */
25 | public Image getImage(E entry) {
26 |
27 | File imageFile = getImageFile(entry);
28 |
29 | if (!imageFile.exists())
30 | return null;
31 |
32 | try {
33 |
34 | Image image = ImageIO.read(imageFile);
35 |
36 | return image;
37 |
38 | } catch (IOException e) {
39 | }
40 |
41 | return null;
42 | }
43 |
44 | /**
45 | * Gets the image file.
46 | *
47 | * @param entry
48 | * the entry
49 | * @return the image file
50 | */
51 | public abstract File getImageFile(E entry);
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/tracking/RectangleAnnotationRenderer.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations.editor.tracking;
2 |
3 | import java.awt.Graphics2D;
4 | import java.awt.Rectangle;
5 | import java.awt.Shape;
6 |
7 | import si.vicos.annotations.RectangleAnnotation;
8 | import si.vicos.annotations.editor.AnnotationRenderer;
9 |
10 | /**
11 | * The Class RectangleAnnotationRenderer.
12 | */
13 | public class RectangleAnnotationRenderer implements AnnotationRenderer {
14 |
15 | /** The shape. */
16 | private Shape shape;
17 |
18 | /**
19 | * Instantiates a new rectangle annotation renderer.
20 | *
21 | * @param annotation
22 | * the annotation
23 | */
24 | public RectangleAnnotationRenderer(RectangleAnnotation annotation) {
25 |
26 | shape = new Rectangle((int) annotation.getX(), (int) annotation.getY(),
27 | (int) annotation.getWidth(), (int) annotation.getHeight());
28 |
29 | }
30 |
31 | /*
32 | * (non-Javadoc)
33 | *
34 | * @see
35 | * si.vicos.annotations.editor.AnnotationRenderer#paint(java.awt.Graphics2D)
36 | */
37 | @Override
38 | public void paint(Graphics2D g) {
39 |
40 | g.draw(shape);
41 |
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/tracking/AnnotatedSequenceListener.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations.tracking;
2 |
3 | import java.util.Set;
4 |
5 | /**
6 | * The listener interface for receiving annotatedSequence events. The class that
7 | * is interested in processing a annotatedSequence event implements this
8 | * interface, and the object created with that class is registered with a
9 | * component using the component's
10 | * addAnnotatedSequenceListener method. When
11 | * the annotatedSequence event occurs, that object's appropriate
12 | * method is invoked.
13 | *
14 | * @see AnnotatedSequenceEvent
15 | */
16 | public interface AnnotatedSequenceListener {
17 |
18 | /**
19 | * Interval changed.
20 | *
21 | * @param sequence
22 | * the sequence
23 | * @param interval
24 | * the interval
25 | */
26 | public void intervalChanged(AnnotatedSequence sequence, Interval interval);
27 |
28 | /**
29 | * Metadata changed.
30 | *
31 | * @param sequence
32 | * the sequence
33 | * @param key
34 | * the key
35 | */
36 | public void metadataChanged(AnnotatedSequence sequence, Set key);
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Aibu - image sequence annotator
2 | ===============================
3 |
4 | Aibu is an image sequence annotator developed and used by the [VOT challenge](http://votchallenge.net/). User can annotate movement of a single target in an image sequence.
5 |
6 | The annotator was only used within the VOT challenge organization until now and is therefore considered an alpha level software. A lot of features are missing or are not fully polished. If you find such a case you are welcome to open an issue report on Github.
7 |
8 | Features:
9 |
10 | * input: image sequence
11 | * per-frame tags
12 | * bounding box interpolation
13 | * aligned or rotated bounding box
14 | * undo, redo
15 |
16 | 
17 |
18 | Building
19 | --------
20 |
21 | The annotator is written in Java and can be built using Ant build tool. It depends on the [coffeshop](https://github.com/lukacu/coffeeshop) library.
22 |
23 | $ # build and add coffeshop library to your classpath
24 | $ ant
25 |
26 | `deploy/aibu.jar` will be created
27 |
28 | Using
29 | -----
30 |
31 | $ java -jar deploy/aibu.jar si.vicos.annotations.editor.Annotator
32 |
33 | Sample Annotations
34 | ------------------
35 |
36 | Available on http://votchallenge.net/.
37 |
--------------------------------------------------------------------------------
/src/si/vicos/annotations/editor/ImageCache.java:
--------------------------------------------------------------------------------
1 | package si.vicos.annotations.editor;
2 |
3 | import java.awt.image.BufferedImage;
4 | import java.io.File;
5 | import java.io.IOException;
6 |
7 | import javax.imageio.ImageIO;
8 |
9 | import org.coffeeshop.cache.DataCache;
10 | import org.coffeeshop.io.TempDirectory;
11 |
12 | /**
13 | * The Class ImageCache.
14 | */
15 | public class ImageCache extends DataCache