Comments (15)
@kyamagu Thank you very much. It worked. :)
from js-segment-annotator.
@anandcu3 Do you change the set of labels? The crash happens because the annotation data seem to contain a label index outside of the given set.
https://github.com/kyamagu/js-segment-annotator/blob/master/js/app/edit.js#L476
from js-segment-annotator.
@kyamagu I did not change the labels but the annotation image was generated by a inaccurate ML algorithm . But I made sure the value in the annotations are between 0 and n (num of classes). 1->Sky, 2->Building etc..
from js-segment-annotator.
@anandcu3 You have to have 0
index (usually background) in the label set.
from js-segment-annotator.
@kyamagu Isn't that Sky in my case ?
from js-segment-annotator.
@anandcu3 You are mapping Sky to 1
, not 0
.
from js-segment-annotator.
If you really intend to use Sky for 0
, then I assume there is invalid integer index in the incomplete data.
from js-segment-annotator.
@kyamagu I'm sorry I made a mistake in my earlier message. I have mapped sky-->0, building->1 and so on.. So background is sky which has value 0 in the image.
from js-segment-annotator.
@anandcu3 Ok, then first check unique set of index values in the annotation PNG.
from js-segment-annotator.
The other question is are there any specifications to the annotations image format that has to be taken care of ..
from js-segment-annotator.
@anandcu3 The format is specified in README.
from js-segment-annotator.
a=cv2.imread("data/annotations/00001.png")
print(numpy.unique(a))
returned
array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], dtype=uint8)
from js-segment-annotator.
@anandcu3 The PNG is RGB-encoded UINT32 and cannot be read just by cv2.imread
. Make sure all the index values are properly formatted. Other than that, you can always open up browser javascript console to inspect values.
from js-segment-annotator.
@kyamagu I've an array with the same shape of an image. Each pixel representing the class label. How do I encode this? I've been trying to use the encode portion of the code in README but I get this error.
Traceback (most recent call last): File "D:\anand\anaconda3\lib\site-packages\PIL\Image.py", line 2167, in fromarray mode, rawmode = _fromarray_typemap[typekey] KeyError: ((1, 1, 3, 3), '|u1')
During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "D:\anand\anaconda3\lib\site-packages\PIL\Image.py", line 2170, in fromarray raise TypeError("Cannot handle this data type") TypeError: Cannot handle this data type
from js-segment-annotator.
@anandcu3 Convert the array to uint32 first, then try encoding with the code example.
from js-segment-annotator.
Related Issues (20)
- the dimension of label picture? HOT 1
- Annotated image are mostly zero pixel value HOT 2
- How to code RGB and index information (8b) HOT 3
- Allow contiguous pixels only in superpixel tool HOT 2
- Possible to update the annotation image after editing? HOT 1
- The Upload image size is limited HOT 2
- Support for large images HOT 1
- How to download the annotated image after annotation HOT 1
- How to export the annotated png as json not png. The same way as it is exporting in http://clothingparsing.com/# HOT 9
- How to create one-channel map for output of segmentation tool HOT 1
- Amazon MTurk HOT 3
- Details regarding saved image. HOT 1
- Better annotation display HOT 3
- Erase functionality HOT 10
- The annotation masks disappear when clicked on Next button HOT 5
- Image export HOT 1
- Anyway way to debug when finding boundaries goes wrong? HOT 2
- Brush tool used in the lateral border paints pixels on the other side of the image
- Polygon is difficult to close
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-segment-annotator.