Skip to content

Manual tool doesn't display landmark on all thumbnails #1544

Description

@badgar322

Bug: Manual Tool F9 thumbnail mesh renders only on some thumbnails for some videos

Description

In the Manual Tool, toggling landmark mesh display with F9 sometimes only draws the mesh overlay on a subset of the thumbnails in the bottom face viewer.

This does not happen on every video/alignment file. On most videos it works correctly. On affected videos, roughly 50–80% of thumbnails show the mesh, while the rest show only the face thumbnail with no mesh overlay.

The affected faces do have valid landmarks; the issue appears to be rendering/display-related rather than missing alignment data.

Steps to reproduce

  1. Open the Manual Tool with an affected video/alignment file.
  2. Press F9 to enable thumbnail landmark mesh display.
  3. Observe the bottom thumbnail viewer.

Expected behavior

All thumbnails with valid faces/landmarks should display the landmark mesh when F9 mesh display is enabled.

Actual behavior

Only some thumbnails display the mesh overlay. Other thumbnails remain visible but without the mesh overlay.

Notes

  • Regenerating thumbnails does not fix the issue.
  • The issue is intermittent across datasets/videos: some videos are unaffected.
  • The issue appears limited to the thumbnail face viewer, not necessarily the main frame editor.
  • This may be related to canvas object recycling, viewport redraw, or canvas z-order.

Suspected cause

The face viewer appears to recycle canvas objects for thumbnails and mesh overlays. On affected videos, some mesh overlay objects may remain below thumbnail image objects or otherwise fail to redraw after F9 toggles mesh display.

Proposed fix

Force mesh to top after viewport update.

In tools/manual/faceviewer/viewport.py, inside class Viewport, method update().

self._canvas.tag_raise("viewport_mesh", "viewport_image")
self._canvas.tag_raise("active_mesh_polygon", "viewport_image")
self._canvas.tag_raise("active_mesh_line", "viewport_image")
self._canvas.tag_raise("active_highlighter")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions