|
--- |
|
pipeline_tag: image-classification |
|
--- |
|
# Model Card: Fine-Tuned InceptionV3 & Xception for Human Decomposition Image Classification |
|
|
|
<!-- Provide a quick summary of what the model is/does. --> |
|
|
|
These CNN models were developed for the classification of human decomposition images into various stage of decay categories, including fresh, early decay, |
|
advanced decay, and skeletonized (Megyesi et al., 2005). |
|
|
|
## Model Details |
|
|
|
### Model Description |
|
|
|
- **Developed by:** Anna-Maria Nau |
|
- **Funded by:** National Institute of Justice |
|
- **Model type:** CNNs for Image Classification |
|
- **Base Model:** InceptionV3 and Xception pretrained on ImageNet |
|
- **Transfer Learning Method:** Two-step transfer learning: (1) freeze all pre-trained convolutional layers of the base model and train newly added classifier layers on custom dataset and (2) unfreeze all layers, and fine-tune model end-to-end on custom dataset. |
|
|
|
### Model Sources |
|
|
|
- **Paper :** |
|
- [Stage of Decay Estimation Exploiting Exogenous and Endogenous Image Attributes to Minimize Manual Labeling Efforts and Maximize Classification Performance](https://ieeexplore.ieee.org/abstract/document/10222106) |
|
- [Towards Automation of Human Stage of Decay Identification: An Artificial Intelligence Approach](https://arxiv.org/abs/2408.10414) |
|
|
|
## Usage |
|
The stage of decay classification is bodypart specific, that is, for the head, torso, or limbs. |
|
Classes: fresh (1), early decay (2), advanced decay (3), and skeletonized (4) based on [Megyesi et al's](https://pubmed.ncbi.nlm.nih.gov/15932096/) scoring method. |
|
|
|
|
|
```python |
|
from tensorflow.keras.models import load_model |
|
import numpy as np |
|
from tensorflow.keras.preprocessing.image import img_to_array, load_img |
|
|
|
# Load the entire model |
|
model = load_model('path_to_your_model') # e.g. head/inceptionV3 to perform stage of decay classfication of head images |
|
|
|
# Load and preprocess an image |
|
img = load_img('path_to_image.jpg', target_size=(299, 299)) # adjust size as per model input |
|
img = img_to_array(img) # convert to numpy array |
|
img = np.expand_dims(img, axis=0) # add batch dimension |
|
img = img / 255.0 # normalize pixel values if needed |
|
|
|
# Make predictions |
|
predictions = model.predict(img) |
|
|
|
# Use argmax to get the class label |
|
predicted_class = np.argmax(predictions, axis=1) |
|
``` |
|
|
|
|