LivePyxel: accelerating image annotations with a Python-integrated webcam live streaming

Uriel Garcilazo-Cruz, Joseph O. Okeme, Rodrigo A. Vargas–Hernández

TL;DR

This paper introduces LivePyxel, a Python-based GUI that streamlines image annotation by integrating live webcam feeds with precise Bézier spline tools. This accelerates the creation of high-quality datasets for computer vision models, particularly for complex, organic shapes often found in scientific imaging.

What Problem Does This Paper Address?

Developing accurate computer vision models, especially for tasks like image segmentation, heavily relies on large, high-quality annotated datasets. However, creating these datasets is a time-consuming bottleneck. Existing annotation tools often require uploading pre-collected data, which is inefficient for on-demand pipelines common in scientific settings like microscopy. Furthermore, many tools struggle to accurately annotate organic or curved shapes using only polygons, leading to tedious work and potential inaccuracies. The authors aim to bridge this gap by providing a tool that allows for on-site, real-time annotation with more precise tools for complex shapes.

Methods

LivePyxel is built as a Python GUI using the Qt framework, leveraging OpenCV for efficient image handling and NumPy for matrix operations. Its core innovations include:

  • Live Webcam Integration: Seamlessly streams video from various devices (webcams, microscopes) directly into the annotation interface, enabling real-time capture and labeling.
  • Bézier Spline Tools: Offers Bézier splines for annotating curved and organic shapes, providing a more precise and efficient alternative to traditional polygon tools. This allows for smoother contours with fewer control points.
  • Binary Mask Generation: Enables semi-automated annotation by creating binary masks based on pixel intensity or color thresholds, useful for controlled environments and speeding up initial segmentation.
  • Multi-Layered Structure: Annotations are managed on independent, non-destructive layers, allowing for flexible editing and modification without affecting other annotations.
  • Tablet Integration: Optimized for use with drawing tablets, enhancing user experience and precision.

Datasets

The paper uses two primary datasets for demonstrating LivePyxel's capabilities:

  • Environmental Microorganisms Dataset: A dataset of 1,250 image-mask pairs of microorganisms from water samples, used for training a U-Net model for segmentation. This dataset highlights challenges with underrepresented and morphologically variable classes.
  • Snail Shells Dataset: An "engineered" dataset of 10,000 image-mask pairs created by augmenting an initial dataset of 1,400 snail shell images. This demonstrates LivePyxel's ability to automate dataset creation in controlled environments and evaluate its scalability.

Key Insights and Ideas

  • Bridging the Gap for Scientific Imaging: LivePyxel directly addresses the need for on-demand, on-site annotation in scientific fields where data acquisition and analysis are tightly coupled.
  • Bézier Splines for Organic Shapes: The adoption of Bézier splines is a significant improvement over polygon-based tools for accurately segmenting biological and other organic structures, leading to better annotation quality and efficiency.
  • Semi-Automation for Efficiency: The binary mask feature offers a powerful way to accelerate annotation in controlled settings, significantly reducing manual effort.
  • Layered Editing for Flexibility: The non-destructive, layered approach to annotations provides a robust and user-friendly editing experience, akin to professional graphics software.

Key Results

  • Annotation Accuracy: LivePyxel demonstrated comparable or slightly higher annotation accuracy than other tools in a benchmark test, with a balanced trade-off between false positives (5.7%) and false negatives (0.5%).
  • Annotation Speed: While not explicitly quantified in a single number for all tools, the paper implies that LivePyxel's Bézier splines and semi-automated features contribute to efficient annotation workflows. The benchmark table shows LivePyxel taking 173 seconds for a complex image, which is competitive.
  • Model Performance: U-Net models trained on datasets annotated with LivePyxel achieved good performance. For the snail shell dataset, F1 scores were consistently high across all classes (above 0.95) after just a few epochs. The environmental microorganisms dataset showed good performance on dominant classes but struggled with rare or ambiguous ones, highlighting dataset challenges rather than tool limitations.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that the environmental microorganisms dataset suffered from class imbalance and underrepresentation of certain taxa, impacting model performance.
  • While LivePyxel's accuracy is good, CVAT achieved slightly lower overall error by leveraging AI-assisted segmentation, though with a more complex setup.
  • Future Work:
    • Implementing zoom functionality within the central canvas for finer detail work.
  • Integrating AI vision models (like SAM) to assist in accelerating the annotation process, inspired by tools like CVAT.

Summary updated

BibTeX
@misc{garcilazocruz2025livepyxel,
  author = {Uriel Garcilazo-Cruz and Joseph O. Okeme and Rodrigo A. Vargas–Hernández},
  title = {{LivePyxel: accelerating image annotations with a Python-integrated webcam live streaming}},
  year = {2025},
  eprint = {2509.13504},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.13504},
}
Figure