Views
No views yet
| Property | Details |
|---|---|
| Framework | TensorFlow / TFLite |
| Base Model | modelv2.keras — a Keras video violence detection model |
| Input Shape | (1, 16, 224, 224, 3) — batch × frames × height × width × channels |
| Architecture | CNN + LSTM (contains dynamic LSTM loops) |
| Platform | Kaggle (GPU hidden to avoid CuDNN conflicts) |
model_dynamic_quant.tflitemodel_fp16_quant.tflitemodel_full_int8.tflitetensorflow
numpy1import tensorflow as tf
2
3tf.config.set_visible_devices([], 'GPU') # Hide GPU to avoid CuDNN issues
4model = tf.keras.models.load_model('path/to/modelv2.keras')model_dynamic_quant.tflitemodel_fp16_quant.tflitemodel_full_int8.tflitedummy_data in representative_data_gen() with real video frames from your training set to get accurate quantization ranges.1converter.target_spec.supported_ops = [
2 tf.lite.OpsSet.TFLITE_BUILTINS,
3 tf.lite.OpsSet.SELECT_TF_OPS
4]
5converter._experimental_lower_tensor_list_ops = Falsetf.function with a tf.TensorSpec to lock the input shape to (1, 16, 224, 224, 3) before conversion — this is required for correct INT8 LSTM quantization.| File | Method | Precision |
|---|---|---|
model_dynamic_quant.tflite | Dynamic Range | Weights: INT8, Activations: float32 |
model_fp16_quant.tflite | Float16 | Weights & Activations: float16 |
model_full_int8.tflite | Full Integer | Weights & Activations: INT8 |