Tensorboard: [projector] unicode not supported for 3D mode labels

Created on 18 Aug 2017  Â·  5Comments  Â·  Source: tensorflow/tensorboard

七 2 1 0 4
this is a part of the metadata.tsv file. I replace all the number 7 to Chinese word 七.

When I disable the 3d labels mode, I can see the Chinese word 七 and numbers . When I enable the 3d labels mode, the Chinese word 七 disappear. But the numbers can display normally.

logs.tar.gz

the logs.tar.gz, I download from https://github.com/tensorflow/tensorflow/issues/10756 and replace all the number 7 to Chinese word 七.

projector contributions welcome bug

Most helpful comment

Thanks! Unfortunately, it's not trivial to create a glyph texture for all unicode letters in WebGL, which is what's needed in 3D mode. But, I want to emphasize that it's important that we support all unicode letters in 3D mode.

If anyone wants to take a shot, here is a pointer to the code where all glyphs are created: https://github.com/tensorflow/tensorboard/blob/866bb01b014f786c83462eed807587f3dd39de03/tensorboard/plugins/projector/vz_projector/scatterPlotVisualizer3DLabels.ts#L112

All 5 comments

cc @dsmilkov

Thanks! Unfortunately, it's not trivial to create a glyph texture for all unicode letters in WebGL, which is what's needed in 3D mode. But, I want to emphasize that it's important that we support all unicode letters in 3D mode.

If anyone wants to take a shot, here is a pointer to the code where all glyphs are created: https://github.com/tensorflow/tensorboard/blob/866bb01b014f786c83462eed807587f3dd39de03/tensorboard/plugins/projector/vz_projector/scatterPlotVisualizer3DLabels.ts#L112

I'm on the same boat. Japanese can't be displayed. To change the font from roboto to something, it'll solve?

I'm not sure that the font choice is really the obstacle here per @dsmilkov's comment above. Perhaps what would work to avoid having the glyph texture grow too large would be to first go through the labels and collect all the distinct codepoints, and then render glyphs just for those codepoints into the texture? That way it wouldn't need to be all of unicode.

I try to draw the chinses text in an image (opencv or PIL can do that, note to uniform the front size with image size ),
then we can present the text info on tensorboard canvas。

Was this page helpful?
0 / 5 - 0 ratings