How samiurprapon/brasizeprediction works
Project type and purpose
• This is an offline-first machine-learning image-processing project (“BraSizePrediction”) implemented in Python/Jupyter notebooks. Its eventual goal is to port the trained neural network to an Android app for real-time bra-size prediction without sending data off the device.
File structure
• Top-level artifacts:
• Jupyter notebooks (Main.ipynb, Bra Detection.ipynb, etc.) for EDA, preprocessing, model training and evaluation
• Model weight files (.h5) for two variants: bra_dection_mobileNetV2.h5 and bra_dection_mobileNetV2_improvised.h5
• dataset/ directory with two subfolders (with_bra, without_bra) containing raw image data
• data.csv and measurements.txt for meta-data labeling
• testsets folder for hold-out validation sets
• docs/ with a proposal PPTX
• No dedicated “src” directory or microservices—this is a monolithic ML research repository.
README for additional insights
• Describes 100% offline operation, privacy emphasis, future Android port.
• Uses a MobileNetV2 backbone for quick on-device inference.
Main components
a. Data Ingestion & Storage
• Raw images in dataset/with_bra and dataset/without_bra
• Metadata in data.csv & measurements.txt
b. Preprocessing & Augmentation
• Jupyter notebooks handle resizing, normalization, on-the-fly augmentations (rotate, flip, brightness)
c. Model Training Pipeline
• MobileNetV2 (Keras/TensorFlow) backbone
• Notebook orchestrates training loop, callbacks, checkpoints
• Final weight files stored as .h5 artifacts
d. Model Artifact Repository
• Versioned .h5 files alongside notebooks for reproducibility
e. Evaluation & Testing
• Testsets folder used for final accuracy, confusion matrices, metrics logging
f. Inference Engine / Mobile App
• Android app embedding TensorFlow Lite model (converted from .h5)
• On-device preprocessing module
• Real-time camera feed → prediction → UI display
Relationships & interactions
• Preprocessing → Training Pipeline
• Training Pipeline → Model Artifacts
• Model Artifacts → TFLite conversion → Mobile App
• Mobile App ↔ On-device inference (no network call)
Architectural patterns & design principles
• ML pipeline pattern: clear separation of data ingestion, preprocessing, training, inference
• Offline-first principle: the mobile app must embed all models and data transformations locally
• Modular notebooks for reproducibility and iterative experimentation
• Model versioning: store multiple .h5 variants to compare performance
Technologies, frameworks & libraries
• Python, Jupyter Notebook for prototyping
• TensorFlow/Keras for CNN (MobileNetV2)
• Pandas & OpenCV/Pillow for data preprocessing
• TensorFlow Lite for Android deployment
• Git for version control
Detail
• Major file groups (notebooks, datasets, model weights, docs)
• How switching between .h5 variants fits into a versioned training cycle
• Offline-only data flow—no external API or cloud dependency