NaturalIntelligence / imglab

To speedup and simplify image labeling/ annotation process with multiple supported formats.
https://solothought.com/imglab/
MIT License
977 stars 596 forks source link

Right panel not refreshed accordingly #86

Open alvinvoo opened 6 years ago

alvinvoo commented 6 years ago

Describe the bug I notice there's a bug with the refreshing of the right panel. Ideally it should refresh with the updated feature points every time when I add a new point or when I click a different image in the image-slider, but now, the panel only refreshes when I move the 'feature rectangle' with the move tool.

To Reproduce Steps to reproduce the behavior:

  1. Load an image
  2. Add some feature points to the image, you won't see the feature points in right panel
  3. If you move the feature rectangle with the move tool then the right panel will be refreshed
  4. Same thing happens when you load another image and switch around images in image-slider. Ideally the right panel should be refreshed according to image.

Screenshots This screencast is taken from 'http://imglab.ml/', not my local setup imglab_issue

Console Errors There's no console error

Device detail (please complete the following information):

Additional context I suspect this is just due to right panel not being remounted when necessary, I will look into when I have the time.. or @amitguptagwl has any idea?

Watch for changes, or Bookmark for easy discovery. Fund this project for new features and maintenance. [Showcase] your project with us by raising an issue

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/62448580-right-panel-not-refreshed-accordingly?utm_campaign=plugin&utm_content=tracker%2F76641010&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F76641010&utm_medium=issues&utm_source=github).
amitguptagwl commented 6 years ago

This is not a bug but something not implemented. Hence you can't see any error in console.

What is currently happening?

Hence you see the updated information. But this thing has to be implemented whenever any change happens on the workarea. Eg

In short, whenever there is a change on workarea or any new image is loaded then label panel should be refreshed.

So why there is no issue created yet?

If you notice a label shape is drawn on image in 2 ways

  1. Manually : when someone manually creates it.
  2. Automatically : using some plugin (FPP currently), when data file is imported, or when we switch between images.

Whenever a shape is created on image using any above method, we need to attach necessary events like resize, drag, select etc. Currently there is duplicate code presents in workarea.tag.html for manual and automatic way.

We first need to refactor this to make it simple. we also need to emit events when a change happen on workarea. So that on each change label-panel can be updated.

As we don't have any unit test to test the UI, it is difficult to identify any breaking change.

Hence these issues are not addressed yet.

So what should we do?

Implementing unit test is good but can be postponed. But refactoring workarea.tag.html is necessary to go ahead to update label-panel on correct moment.