Instructions to use Anushdcosta/weapon-classifier-final-tuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Anushdcosta/weapon-classifier-final-tuned with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://Anushdcosta/weapon-classifier-final-tuned") - Notebooks
- Google Colab
- Kaggle
Fine-Tuned Weapon vs. Not-Weapon Classifier (VGG16)
This repository contains a fine-tuned image classification model designed to distinguish between "Weapon" and "Not-Weapon" classes in images. The model was built using Transfer Learning on the VGG16 architecture.
Model Structure and Training
- Base Architecture: VGG16 (pre-trained on ImageNet).
- Training Method: Transfer Learning (Feature Extraction) followed by Fine-Tuning.
- File:
weapon_classifier_final_tuned.keras(This is the final, fine-tuned model file). - Input Size: Images must be resized to (224, 224) pixels before prediction.
- Output Activation: Sigmoid (yielding a single probability value between 0 and 1).
How to Use the Model (Inference)
To use this model, you need a Python environment with TensorFlow installed.
1. Installation
First, ensure you have the required libraries:
pip install tensorflow numpy Pillow