Downloads · 30 days
7
27% of all-time downloads
FahimFBA/carcrashdetection-mobilenetv2
carcrashdetection-mobilenetv2 is a machine learning model from FahimFBA. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for keras. The card lists the license as apache-2.0.
Detect Car/Vehicle Crash using this model (used MobileNetV2.0)
Downloads · 30 days
7
27% of all-time downloads
All-time downloads
26
Public
Repo size
29.5 MB
Likes
3
Public
Click a slice to open those files.
.keras29.5 MB · 100%
From the Hugging Face model README
Detect Car/Vehicle Crash using this model (used MobileNetV2.0)
import tensorflow as tf
from tensorflow.keras.models import load_model
import numpy as np
# Load the model
model_path = 'path/to/save/directory/best_model_iphim.keras'
model = load_model(model_path)
# Compile the model if you want to continue training
model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['binary_accuracy'])
# Example function to continue training
def continue_training(model, new_train_ds, new_test_ds, epochs=10):
history = model.fit(new_train_ds, epochs=epochs, validation_data=new_test_ds)
return history
# Example function to make predictions
def make_predictions(model, input_data):
predictions = model.predict(input_data)
return predictions
# Example usage
if __name__ == "__main__":
# Load your new dataset here
new_train_ds = ... # Replace with your new training dataset
new_test_ds = ... # Replace with your new testing dataset
# Continue training
history = continue_training(model, new_train_ds, new_test_ds, epochs=10)
# Load new input data for predictions
new_input_data = ... # Replace with your new input data for predictions
# Make predictions
predictions = make_predictions(model, new_input_data)
print(predictions)
This is a standalone model.
93.42% Validation Accuracy