๐ต Fake Currency Detection Using AI and Streamlit
Have you ever wondered if that โน500 note in your wallet is real or fake? Counterfeit currency is a growing concern worldwide, especially in countries like India where the economy relies heavily on cash transactions. Fortunately, with advancements in AI, we can now automate the detection of fake currency using smart image analysis techniques. In this blog post, weโll explore how to build a Fake Currency Detection app using Streamlit, Google’s Gemini AI, and a touch of Text-to-Speech magic!
๐ What Does the App Do?
This web-based application allows users to upload an image of a currency note and instantly get a detailed analysis:
Identifies whether the note is original or counterfeit
Extracts the amount and serial number from valid notes
Provides insights in five Indian languages โ English, Hindi, Marathi, Gujarati, and Kannada
Uses Google Gemini (Generative AI) for intelligent image interpretation
Reads out the result with pyttsx3 text-to-speech
๐ง Technologies Used
Python
Streamlit โ for the web interface
Google Generative AI (Gemini) โ for smart image analysis
Pyttsx3 โ to convert the analysis into speech
Pathlib โ to handle file operations
โ๏ธ How It Works
Here’s a breakdown of how the app functions:
Upload an Image The user uploads a picture of the currency note in JPEG, PNG, or JPG format.
Image Processing + AI Prompt The image is sent to Google Gemini with a carefully crafted prompt. The prompt includes:
A request to analyze the note for authenticity
A multilingual breakdown (English, Marathi, Hindi, Gujarati, Kannada)
Extraction of the currency amount and serial number if the note is genuine
AI Response Displayed The response from Gemini AI is shown on the screen and also spoken aloud.
Safety & Moderation Safety settings are applied to block inappropriate content, ensuring a secure and ethical user experience.
๐ฆ Key Code Highlights
# Upload and analyze image
uploaded_file = st.file_uploader("Upload the currency note image", type=["png", "jpg", "jpeg"])
submit_button = st.button("Generate the Analysis")
if submit_button and uploaded_file is not None:
image_data = uploaded_file.getvalue()
image_parts = [{"mime_type": uploaded_file.type, "data": image_data}]
# Prompt for AI model
prompt_parts = [image_parts[0], system_prompt]
response = model.generate_content(prompt_parts)
# Display and speak the result
analysis_text = response.text
st.write(analysis_text)
engine = pyttsx3.init()
engine.say(analysis_text)
engine.runAndWait()
๐ท A Glimpse of the UI
The app starts with a simple layout:
An image upload box
A submit button
An area to display AI-generated results
The currency analysis is powered by Gemini, ensuring high accuracy and efficiency.
This Fake Currency Detection tool demonstrates the power of combining AI and user-friendly web technologies to solve real-world problems. With just an image, users can verify currency and gain insights in multiple Indian languagesโmaking it accessible and impactful.
Whether youโre a developer or someone curious about AI applications, this project is a great start into the world of image-based generative intelligence.
fake currency detection github, fake currency detection using machine learning, fake currency detection project, fake currency detection dataset, fake currency detection using image processing, fake currency detection research papers, fake currency detection using deep learning, fake currency detection kaggle, fake currency detection machine, fake currency detection using matlab, fake currency detection online, free fake currency detection, fake currency detection app,
Leave a Reply