Artificial Intelligence

Bridging Worlds: From Cybersecurity to Applied AI with LensBlock

As someone with a background rooted in the critical domain of cybersecurity, my journey into Artificial Intelligence initially felt like stepping into an entirely new universe. Yet, the more I delved into AI, the more I realized its profound potential to not just enhance, but fundamentally redefine security paradigms. Learning AI has been transformative, broadening my scope within the tech industry and empowering me to pursue passion projects that blend my security insights with cutting-edge technology.

One such endeavor is my work on terrorist activity predictive modeling and pattern finding for district Quetta (will broaden scope to all Pakistan in next stages), a complex project where I am currently focused on curating a highly accurate and comprehensive dataset, a foundational step that, as I've learned, dictates the success of any robust AI model.

But today, I want to talk about another project that's been both a challenge and a joy: LensBlock .

LensBlock v1: Your Digital Privacy Shield

LensBlock started with a simple, yet critical, premise: protecting digital privacy during sensitive screen-sharing sessions. In an era dominated by remote work and virtual meetings, the accidental exposure of confidential information via a stray phone camera is a very real threat.

My goal with LensBlock v1 was to create an intelligent desktop application that could:

  1. Real-time Threat Detection: Continuously monitor the user's webcam feed for the presence of recording devices (like cell phones or cameras).
  2. Instant Privacy Shield: Automatically blur or black out the screen the moment a threat is detected, ensuring no sensitive data is captured.
  3. Hardware Accelerated: Leverage the power of local GPUs (specifically AMD's DirectML backend via ONNX Runtime) to perform this detection with minimal latency, even on commodity hardware.

Getting this to work involved integrating several complex pieces:

  • PyQt6: For a responsive, cross-platform user interface.
  • OpenCV: For robust webcam interaction and image processing.
  • YOLO26 (ONNX): For lightning-fast, accurate object detection.
  • QThreads: To ensure the AI processing happens in the background, keeping the UI fluid and preventing freezes.

I'm thrilled to report that LensBlock v1 is now fully operational! It successfully detects devices and activates the privacy shield, providing a foundational layer of visual data security.

Evolution with Expert Guidance: The Road to LensBlock v2

The journey hasn't been solitary. I'm incredibly grateful for the invaluable guidance from my mentors, Sir Umair and Sir Rafay . Their insights have not only steered me through technical hurdles but have also challenged me to think bigger and broaden the project's scope.

Initially, I planned to fine-tune the YOLOv8 model with custom datasets to improve detection accuracy for edge cases. However, following Sir Umair's brilliant suggestion, I realized a more efficient path: upgrading to a much newer, more advanced YOLO architecture. These cutting-edge models (like the latest releases from Ultralytics) offer superior out-of-the-box performance in low-light and tricky angles, completely bypassing the need for extensive custom fine-tuning. This decision significantly fast-tracked the development of v1 and boosted its immediate efficacy.

Their collective vision has now inspired the next iteration: LensBlock v2.

LensBlock v2: Intelligent Real-Time Video Stream Sanitization

LensBlock v2 takes the core detection capability and pivots it towards a more active, non-intrusive form of privacy protection. Instead of just blocking the screen, v2 aims to intelligently cleanse the video feed itself.

The goal for LensBlock v2 is to:

  1. Real-time Object Masking: Detect selected objects (like phones or other sensitive items) within the live camera feed.
  2. On-the-Fly Blurring: Apply a real-time blur or pixelation effect only to the areas where these objects appear.
  3. Virtual Camera Output: Present this "sanitized" video feed as a virtual webcam, allowing users to select "LensBlock Camera" in applications like Zoom, Teams, or OBS.

This means during a sensitive online meeting, if a recording device (or even a confidential document) is inadvertently brought into view, LensBlock v2 would instantly blur just that specific object, maintaining the flow of the meeting while upholding privacy. While this feature might evolve into a separate, standalone application due to its distinct architecture, the core idea is to intercept, sanitize, and broadcast a safe video stream.

Calling All Innovators: Roast My Ideas!

This is where you come in! I'm genuinely excited about the direction of LensBlock and the broader implications of applied AI in security. I believe in iterative development and the power of collective intelligence.

So, I invite you: Please roast my ideas!

  • What are the biggest technical challenges you foresee in implementing LensBlock v2's real-time blurring and virtual camera output?
  • Are there any obvious flaws in my architectural approach for either v1 or the proposed v2?
  • What industry best practices or alternative tools should I be exploring for virtual camera drivers or high-performance video processing?
  • Are there any overlooked privacy implications in creating a virtual camera that processes live video?

Your brutal honesty and innovative solutions are not just welcome, they're essential. Let's make this project robust together!