question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request for High level details to implement brush&erase functionality

See original GitHub issue

My actions before raising this issue

  • Read/searched the docs
  • Searched past issues

Expected Behaviour

Current Behaviour

Possible Solution

Steps to Reproduce (for bugs)

Context

I am looking for details to implement Brush and erase functionality to create segmentation masks (At this moment I am not looking into watershed, superpixel etc implementation). This would ease creation of segmentation masks for very irregular objects appearing in aerial view images, microscope images, medical image segmentation. Some other functionality might require it as well, #606 #772. It seems to be also part of the project Integration of OpenCV.js tools here.

I am not a web developer (i.e. have no javascript experience, but python,c,c++), but are interested in looking into this as my time allows. My request is project admins’ thoughts, specific details and advice on implementing brush&erase functionality.

Your Environment

  • Git hash commit (git log -1):
  • Docker version docker version (e.g. Docker 17.0.05):
  • Are you using Docker Swarm or Kubernetes?
  • Operating System and version (e.g. Linux, Windows, MacOS):
  • Code example or link to GitHub repo or gist to reproduce problem:
  • Other diagnostic information / logs:
    Logs from `cvat` container

Next steps

You may join our Gitter channel for community support.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bsekachevcommented, May 7, 2020

@juanmed @nmanovic

Hi, Implementing only brush and erase in JS client is easy and it doesn’t require using OpenCV. Simple example of brush can be found here. As you can see, only 20 lines of code. Of course it’s very simplified version, but I do not see any difficulties to implement a full version. It’s a question of time only.

The main problem I see is actually converting client masks to polygons and back. I expect to came across “underwater rocks” here. And I am not sure, that implementing the feature on client only is a right way.

Now we have buttons “add rectangle”, “add polygon”, etc. I would suggest to add button “add mask” and consider this mask as an object, just drawn with a brush. So, a user presses the button, selects a label and starts drawing, being able to switch between brush/eraser and to choose a brush/eraser size.

One more important task here is to be able assignee mapping between labels and colors. It is important not only for masks actually. I don’t expect it is difficult. Just to add a field to database and change label constructor (add a color picker)

Later we can add advanced features like watershead from OpenCV.

I am not sure if you need to be acquainted with technical details of implementation right now. Let me know if you need.

1reaction
nmanoviccommented, May 6, 2020

@bsekachev , could you please share your ideas?

From my perspective I will recommend to prototype the feature in UI only. Let’s add these tools and convert to polygons internally. You need to convert masks to polygons only when somebody saves annotations.

Read https://github.com/opencv/cvat/blob/develop/CONTRIBUTING.md guide. Unfortunately in this case you need to implement the whole feature in js/ts/css.

Read more comments on GitHub >

github_iconTop Results From Across the Web

3 ways to manage software feature request - Amoeboids
Discover best practices to manage feature requests from different stakeholders. Practical tips to get you on top of the game.
Read more >
7 Useful Tips to Manage Feature Requests - Craft.io
Feature requests can provide product managers with great ideas for product improvement, but they must be managed correctly. Here are our top tips....
Read more >
Paint with the Mixer Brush in Photoshop - Adobe Support
The Mixer Brush simulates realistic painting techniques such as mixing colors on the canvas, combining colors on a brush, and varying paint ...
Read more >
SCULPT - Blender 2.80 Fundamentals - YouTube
Character artist Julien Kaspar goes over the most used functionality of the Sculpt Mode in Blender. He covers the basics of the interface ......
Read more >
93 Synonyms & Antonyms for HIGH-LEVEL - Thesaurus.com
Find 93 ways to say HIGH-LEVEL, along with antonyms, related words, and example sentences at Thesaurus.com, the world's most trusted free thesaurus.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found