Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Projector can now enlarge/shrink the actual sprite images/placeholders during zooming, which is useful for closer inspection of samples when zooming, or for reducing sprite occlusion when zooming far out.
Demo here: http://tensorserve.com:6011
git clone -b projector-2d-spritezoom https://github.com/francoisluus/tensorboard-supervise.git cd tensorboard-supervise git checkout 9a71c652944672826671a6ff32c6d022e0d9cd01 bazel run tensorboard -- --logdir /home/emnist-2000 --host 0.0.0.0 --port 6011
Supersedes #672: Projector improvements: Pause/resume T-SNE, and 2D sprite element zoom
Sprite shrink and enlarge sizes
Smallest sprite size, and reset zoom size:




Medium enlarge size, and maximum sprite size:
Zoom pivot and offset
The 2D zoom is set according to the projectionMatrix and an offset value, since the default/reset zoom seems to be less than 1 so an offset is needed to ensure 2D sprite sizes are about the same as they were before.
A zoom less than the zoom pivot should produce stronger shrinkage gradient to reduce occlusion when zooming out, and a zoom greater than the pivot should have a weaker enlarging gradient when zooming in to also reduce occlusion, this assumes that the level of sprite occlusion at the zoom pivot is already agreeable.
The arc tangent function displays the desired gradients around the origin as pivot, and one can define an arbitrary sizing speed by using a specific width of the function:


Less than zoom pivot
Lets use the negative domain of the arc tangent to promote faster sizing when zooming out to reduce occlusion, here m is the minimum scaling factor, s the sizing speed, and z the zoom:


Set the minimum scaling factor to 10% and the speed at 2.0, then we calculate the scale accordingly:
When the sizing speed is increased the function responds with an increased gradient around the pivot:




Greater than zoom pivot
Now for a zoom greater than the pivot lets use the positive domain of the arc tangent to promote slower sizing when zooming in to reduce occlusion, here m is the maximum scaling factor, s the sizing speed, and z the zoom:


A maximum size scaling factor of 15x and a slow sizing speed of 0.02 is chosen as it produces an agreeable sizing dynamic:
The sizing speed can also be adjusted here to change the sizing gradient: