Skip to content

Lynx is a project combining several smaller OpenCV initiatives developed for the Hackberry YSWS event, featuring various image processing functionalities on its website.

License

Notifications You must be signed in to change notification settings

Rexaintreal/Lynx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Lynx Logo

Lynx

A web app packed with computer vision tools - built with OpenCV and Flask

GitHub Hackberry Hackatime

OpenCV NumPy EasyOCR


About

Lynx is this collection of image processing tools I built for Hackberry YSWS. It's a website where you can play around with different computer vision stuff - from detecting faces to scanning documents and a bunch of other cool things. Building this was honestly a whole journey. Learned a lot about OpenCV and Flask, especially how tricky real-time processing can get.


Demo Video

The showcase video where i try all the features while running Lynx locally

πŸŽ₯ Watch the full demo here


Features

Here's everything I've added into Lynx. It's organized the same way as the navbar on the website:

Face Intelligence

  • Face Detection: Just counts how many faces are in your picture using Haar Cascades. Pretty basic but it works
  • Face Recognition: This one's cooler - it tries to guess people's age and gender using some pre-trained models
  • Webcam Live: Puts filters on your webcam in real-time (had to move this to client-side because the OpenCV version was super laggy)
  • Emoji Reactor: Looks at your expression and shows a matching emoji. It's pretty fun to mess around with

Image Filters & Effects

  • Image Filters: A bunch of preset filters you can slap onto your images. All the heavy lifting happens on the server
  • Special Effects: The fancy stuff - green screen, color pop, duotone, and isolating specific colors
  • Pixelation: Make your images look pixelated or add that retro game vibe with stripes
  • Background Remover: I've added like 5 different ways to remove backgrounds using OpenCV - from GrabCut to simple color stuff
  • ASCII Art Generator: Turns your images into text art. There are different styles you can try

Vision Tools

  • Object Detection: Tries to figure out what objects are in your image using MobileNet SSD
  • Scene Understanding: Guesses where the photo was taken - like is it a beach, forest, or city
  • QR Code Detection: Scans and reads QR codes from images
  • Number Plate Detection: Finds car number plates and reads them using EasyOCR
  • Location Analyzer (Geo Guesser): My attempt at making a GeoGuessr type thing. It looks for clues in images to guess the location

Color Tools

  • Color Analysis: Shows you the top 10 colors in an image using K-Means clustering
  • Color Manipulation: Change specific colors, play with saturation, shift hues and stuff

Document Tools

  • Document Scanner: Upload a pic of a document and this will straighten it out to look like a proper scan
  • Text Detection: Just draws boxes around any text it finds
  • Text Extractor (OCR): Actually reads the text from images using EasyOCR. Works with a few different languages
  • Captcha Solver: Solves those simple text captchas. Nothing too fancy

Project Structure

Lynx/
β”œβ”€β”€ devlogs/              # Development logs, images, and videos
β”œβ”€β”€ models/               # Python scripts for all computer vision tasks
β”œβ”€β”€ static/               # Static assets (CSS, JavaScript, images)
β”œβ”€β”€ templates/            # HTML templates for the web interface
β”œβ”€β”€ uploads/              # Default directory for user-uploaded images
β”œβ”€β”€ .gitignore            # Git ignore file
β”œβ”€β”€ app.py                # Main Flask application script
β”œβ”€β”€ LICENSE               # MIT License
β”œβ”€β”€ README.md             # You are here!
└── requirements.txt      # Python dependencies

Setup and Installation

Prerequisites

  • Python 3.12+ (I used 3.12.10, so anything 3.12+ should be fine)
  • pip for installing stuff

Installation Steps

  1. Clone the repo:

    git clone https://github.com/Rexaintreal/lynx.git
    cd lynx
  2. Create a virtual environment (recommended):

    I didn't use one while coding this (my bad), but you probably should so you don't mess up your other Python projects.

    Windows:

    python -m venv venv
    .\venv\Scripts\activate

    macOS / Linux:

    python3 -m venv venv
    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt

    Main ones are flask, opencv-python, numpy, pillow, scikit-learn, and easyocr.

  4. First-time OCR setup:

    The first time you use any OCR tools (Text Extractor or Captcha Solver), EasyOCR will start downloading language models. Takes about 5-10 minutes and it might look frozen but it's working. Just keep an eye on the terminal - it'll show the progress. (or any errors)

    GPU Acceleration: If you have a decent GPU, change gpu=False to gpu=True for better performance. I tested it with my laptop's RTX 4050 (6GB VRAM) and it took around 7 minutes on the first run. After that everything works smoothly.

  5. Run it:

    python app.py
  6. Open it up:

    Go to http://127.0.0.1:5000 in your browser


Usage

Pretty straightforward:

  1. Check out the homepage to see all the tools
  2. Pick whatever you want to try from the navbar or the grid
  3. Upload an image (there's an examples folder with test images)
  4. Play around with the sliders if there are any
  5. See the result and download it if you want

License

MIT LICENSE.


Acknowledgements

THE INTERNET - followed many tutorials, articles and webpages while building this.


You may also like...

Some other projects I've built:


Author

Built by Saurabh Tiwari

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •