How rizwansaifi571/qr-authnet-authenticity-detection-with-cnn works
Project type and purpose
• This is a full-stack web application built with Flask that exposes a machine-learning pipeline for authenticating QR code prints (distinguishing original vs. counterfeit).
• The purpose is to allow users to upload QR code images via a web interface, run them through both traditional CV+SVM and a CNN model, and display prediction results and history.
File structure
• Top level:
• app.py: main Flask application entry point
• Procfile & requirements.txt: deployment configuration for Gunicorn/Render
• data/: raw/original & augmented training data (used off-line in notebooks)
• notebooks/: Jupyter notebooks and the serialized CNN model (best_model.h5)
• static/ & templates/: the front-end assets (CSS, HTML pages)
• uploads/ (in README but not in file tree): runtime storage for user-uploaded images
• Architectural patterns: MVC-like separation – templates/ static/ ≈ View, app.py ≈ Controller, notebooks/models ≈ Model
• No traditional database—persistent state is kept in the file system (uploads folder and potentially a log file).
README for additional insights
• Describes two pipelines: a handcrafted-feature + SVM (traditional) and a CNN (deep learning).
• Mentions deployment on Render with Gunicorn, environment variables, and a multi-image upload interface.
• Technologies: Flask, TensorFlow/Keras, scikit-learn, OpenCV, scikit-image, Gunicorn, HTML/CSS/Bootstrap.
Details
• Endpoints and their responsibilities (/landing, /predict, /history, /about).
• Model loading lifecycle (startup vs. per-request).
• Both pipelines (traditional vs. CNN) as parallel subcomponents.
• Don’t omit the static/templates layer that forms the user interface.