How to prepare training data for image segmentation

一个人想着一个人 提交于 2020-01-25 08:35:29

问题


I am using bounding box marking tools like BBox and YOLO marker for object localisation. I wanted to know is there any equivalent marking tools available for image segmentation tasks. How people in academia and research are preparing data sets for these image segmentation tasks. Recent Kaggle competition severstal-steel-defect-detection has pixel level segmentation information. Which tool they used to prepare this data?


回答1:


Generally speaking it is a pretty complex but a common task, so you'll likely be able to find several tools. Supervise.ly is a good example. Look through the demo to understand the actual complexity.

Another way is to use OpenCV to get some specific results. We did that, but results were pretty rough. Another problem is performance. There are couple reasons we use 4K video.

Long story short, we decided to implement a custom tool to get required results (and do that fast enough).

(see in action)

Just to summarize, if you want to build a training set for segmentation you have the following options:

  1. Use available services (pretty much all of them will require additional manual work)
  2. Use OpenCV to deal with a specially prepared input
  3. Develop a custom solution to deal with a properly prepared input, providing full control and accurate results

The third option seems to be the most flexible solution. Here are some examples. Those are custom multi-color segmentation results. You might got an impression custom implementation is way more complex, but as it turned out if you properly implement some straight-forward algorithm you might be surprised with the result. We were interested in accurate pixel-perfect results:

(see in action)




回答2:


I have created a simple script to generate colored masks of annotation to be used for semantic segmentation.

You will need to use VIA(VGG image annotator) tool which gives the facility to mark a region in polygon. Once a polygon is created on a class/attribute you can give an attribute name and save the annotation as csv file. The x,y coordinates of the polygon gets saved in the csv file basically.

The program and steps to use are present at: https://github.com/pateldigant/SemanticAnnotator

If you have any doubts regarding the use of this script you can comment down.



来源:https://stackoverflow.com/questions/58953890/how-to-prepare-training-data-for-image-segmentation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!