Skip to content

MoheEdeen/Where-s-Waldo.jpeg

Repository files navigation

Overview:

This project explores JPEG steganography and steganalysis using a DCT-based (Discrete Cosine Transform) approach. During embedding, a user uploads a JPEG image along with a text file, and the system applies JSteg, an algorithm that hides data by modifying the least significant bits (LSBs) of quantized DCT coefficients during JPEG compression. This produces a visually identical image while embedding a hidden message in the frequency domain.

For detection, the project focuses on single-image DCT-domain analysis. Given a JPEG image, the system examines internal DCT coefficient statistics, focusing on even-odd LSB distributions and how these patterns change under controlled recompression. Based on these statistical deviations, the detector determines whether the image is likely to contain a JSteg-embedded payload.

In testing, the detector achieved a true positive rate of ~90% at a 5% false positive rate when evaluated specifically on small payloads. All reported results correspond to messages of 25 KB embedded in 10-megapixel images (3648 × 2736), which is an embedding rate of approximately 0.02 bits per pixel (bpp).

For Gemini, when the user uploads the image the path will be sent to get statistics of the image. These statistics include the frequencies of the coefficients as a dictionary. After that it will get passed into the Gemini API, specifically the "gemini-3-pro-preview" model where it is asked to look at the slope, do a mirror symmetry check and a pairwise equalization and based on the observations made the model does a prediction on wether the image is clean or not.


How to Use:

For encoding:

  • Upload an image you want to encode with a message
  • Upload a .txt file containing your message (should be 25Kb or less otherwise would not work)
  • Hit begin!

For Steg-detection:

  • Upload your image
  • Choose what time of detection you want, the classical algorithm, using gemini, or both.
  • Hit begin and wait for the response!

NOTE: Although the model and the algorithm are highly accurate they are not perfect.


Tech Stack:

Frontend: React, TypeScript, Vite, Tailwind CSS, Motion

Backend: Flask, Google Gemini API, NumPy, SciPy, Pillow, jpeglib

Tools: JSteg

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors