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.

Segmentation mask generated contains strings and letters at count keyword

See original GitHub issue

At evaluation time, The segmentation json file generated contains buffered strings and letters at count keyword. Example:

{'size': [800, 800], 'counts': b'coa;<1E_h0b0M0O2O000O10000000000000001OO1000000000000000000000000000O1000000000000000000000000001O0000001N1000001O00001N101O0O1O2O2K]b^6'}

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
jsbrokscommented, Apr 5, 2019

Another way to do this:

from imantics import Polygons
def maskToPolygon(mask):
    return Polygons.from_mask(mask).segmentation

both do the same thing, just though I would share.

@Jinksi If you would like RLE support added to the library, post a feature request under the issues

0reactions
AmberHencommented, May 24, 2019

Binary mask to polygons can not guarantee correctness by naively finding contours.

For example, a donut-like mask: binary mask --> polygons(contours) --> binary mask(decode), the hole in the mask will disappear.

Thus I would recommend not to convert any of binary mask or RLE back to polygons.

你好 我在inference里输出来的counts和上边一样 我应该怎么把这些轮廓线画到原图上 这样直观地看到分割的效果。

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module: segmentation — skimage v0.19.2 docs
Defines the starting level set used by the algorithm. If a string is inputted, a level set that matches the image size will...
Read more >
Segmentation error while working with strings - Stack Overflow
When looking at your output, it seems that you have entered a string much longer than 19 characters. So your program has undefined...
Read more >
Generating masks from Encoded Pixels — Semantic ... - Medium
In this tutorial, lets understand how to generate masks, if EncodedPixels are given instead of mask images.
Read more >
Generating Image Segmentation Masks — The Easy Way
Generate Image Segmentation masks the easy way within 5 minutes using the VGG Image Annotator Tool.
Read more >
Image Processing with Python - Data Carpentry
Imagine having to manually count colonies on several thousand images like those above. A Python program using skimage could move through all of...
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