Comprehensive documentation of the MoonRider Car Classification System
The MoonRider Car Classification System is a Django-based application that uses machine learning and OpenAI to classify car images by make, model, and year. The system has been designed with a hybrid approach:
A TensorFlow-based model that is trained on our own dataset. The model is continuously improved through retraining after every 10 classifications.
When the local model has low confidence (below 0.7), the system falls back to OpenAI's advanced vision models for accurate classification.
This diagram illustrates the classification process from image upload to final result:
User uploads a car image through the web interface or API
The image is saved to the media directory and prepared for classification
The image is first analyzed by our local ML model to identify the make, model, and year
Is the model confidence above 0.7?
YES
NO
The model results are used as the final classification
The image is sent to OpenAI's API for classification
The final make, model, and year are stored and displayed to the user
Classification counters are updated and retraining is triggered if necessary
This diagram illustrates how the model retraining process works:
After every 10 classifications, the retraining process is triggered
The system collects all car images with final classifications (at least 5 are required)
The system creates a mapping between unique cars and class indices
A new MobileNetV2-based model is created
Data is split into training and validation sets
Images are augmented for better training
The model is trained using the prepared data with early stopping and learning rate reduction
The model is evaluated on validation data to measure accuracy
The model is saved to disk and registered in the database
The retraining counter is reset and training date is recorded
Current Active Model: No active model yet
Total Models Trained: 0
Training Images Required: 5 minimum
Model Confidence Threshold: 0.7