PictoPy icon indicating copy to clipboard operation
PictoPy copied to clipboard

[FEATURE] Optimization of Image Embedding & Clustering Inference

Open anzinmhd opened this issue 8 months ago • 3 comments

Describe the feature

While exploring the codebase, I noticed that the current face clustering and image embedding generation could be optimized for multi-core systems.

I recently completed a research internship at IIT Palakkad specifically focusing on matrix multiplication optimization in multi-core systems. I'd like to propose a project for GSoC 2026 to implement high-performance inference pipelines for PictoPy, ensuring it handles large libraries smoothly on modern hardware (like Apple Silicon/M-series chips).

I am already familiar with the Python ML stack and would love to discuss how I can integrate these optimizations into the core logic.

Image

Add ScreenShots

Validated the PictoPy backend on macOS 15 (M5 ARM64). Successfully resolved dependency conflicts and confirmed native execution via the Apple Silicon process 'Python' (PID 2822). The server is active and listening on port 52123.

Record

  • [x] I agree to follow this project's Code of Conduct
  • [x] I want to work on this issue

anzinmhd avatar Mar 22 '26 13:03 anzinmhd

šŸ‘‹ Thanks for opening this issue! The maintainers will review it shortly. Till then, do not open any PR. This is a strict rule we like to follow around here :)

github-actions[bot] avatar Mar 22 '26 13:03 github-actions[bot]

Hello šŸ‘‹ I am interested in working on this issue. I have basic knowledge of Python and I’m eager to learn and contribute. I will try to provide a clean and well-documented solution. Please assign this issue to me if possible. Thank you 😊

JITENDRAGAHERWAR03 avatar Mar 30 '26 03:03 JITENDRAGAHERWAR03

Hi, I'm interested in contributing to #1240. I see the original reporter has also expressed interest, so I do not want to duplicate active work. If maintainers consider this scope available or would like it split into separate tasks, I would be happy to take an approved subtask.

I would propose beginning with a benchmark-and-correctness phase rather than changing inference behavior immediately:

  1. Define representative, privacy-safe benchmark fixtures for image embedding and face-clustering workloads.
  2. Measure per-stage time, memory use, throughput, and output stability across supported CPU/provider configurations.
  3. Identify bottlenecks in batching, model-session reuse, image decoding, and executor scheduling.
  4. Make only evidence-backed optimizations, preserving existing embeddings and clustering output unless maintainers explicitly approve a behavior change.
  5. Add regression tests and benchmark documentation so improvements are measurable and do not silently reduce detection or clustering quality.

This would keep the work offline and make performance gains reproducible. If an approved subtask is available, could you please assign it to me?

1sakshm avatar Sep 05 '26 18:09 1sakshm