-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotation workflow #291
base: main
Are you sure you want to change the base?
Annotation workflow #291
Conversation
@@ -228,6 +244,31 @@ class DataPanel extends Panel { | |||
func = (i) => rgb2hsv({r: colorFunc(r[i]), g: colorFunc(g[i]), b: colorFunc(b[i])}).v; | |||
break; | |||
} | |||
case 'rg': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feature creep happened, should probably remove from annotation workflow PR
@@ -143,7 +145,7 @@ void main(void) | |||
if ((vertexState & 2u) == 2u) { | |||
// frozen/hidden | |||
c = vec3(0.0, 0.0, 0.0); | |||
alpha = B * 0.05; | |||
alpha = 0.0; //B * 0.05; // Trace shadow can still be visible when hidden. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this, since it was distracting when classes were hidden, but shadow was still visible.
varying vec4 varying_color; | ||
|
||
// Visualize class instances | ||
uniform vec3 classColors[${GSplatLabels.MAX_UNIFORM_COLORS}]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are limited in the number of colors here, maybe there is a dynamic way of uploading the class colors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to sample the colors from a texture instead of uniform?
if (event.data instanceof Blob){ | ||
try { | ||
// First 64 bytes used for message type | ||
const msgtype = (await event.data.slice(0, 64).text()).replace(/\0+$/, ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use grpc here perhaps.
Wow, amazing @murlock1000. I guess this runs on windows? I'll definitely give a try when I can! |
@slimbuck yes, it runs on windows with the environment prepared according to the gaussian-splatting project requirements - but that is only required to run the demo, not supersplat itself. Additionally, it only requires 'from scene.gaussian_model import GaussianModel', so the whole project dependency could be omitted by extracting the GaussianModel class from it directly and installing libraries like torch on the go. |
@@ -48,7 +48,8 @@ class AssetLoader { | |||
{ | |||
elementFilter: this.loadAllData ? (() => true) : null, | |||
// decompress data on load | |||
decompress: true | |||
decompress: true, | |||
reorder: false, // Do not perform MortonOrder calculation and reordering when working with labels, since we are not persiting the old indices so we could also reorder the labels that come after. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be improved - the ordering of splats and their corresponding labels should persist even after MortonOrder is applied.
const name = (await event.data.slice(64, 128).text()).replace(/\0+$/, ''); | ||
const data = await event.data.slice(128, event.data.size).text(); | ||
const labels = JSON.parse(data); | ||
await scene.updateLabels(labels, name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only way to add labels to the scene for now. WIP - upload labels directly as a file from menu dialog.
} | ||
|
||
class GSplatLabels { | ||
static MAX_UNIFORM_COLORS = 4000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shader code does not compile with larger color buffer - should be reworked to use dynamically allocated buffers perhaps?
(WIP) Implementation of #216
Features:
Known Bugs: