Mukhtasir-Khail-Net: An Ultra-Efficient Convolutional Neural Network for Sports Activity Recognition with Wearable Inertial Sensors
This project is for training a deep learning model to recognize different sports activities using time series data. The project uses a dataset containing sensor data for different activities and applies a deep learning model to classify the activities.
data/
: Contains the dataset.combined_AU-SD.csv
: The dataset file.
src/
: Contains the source code.data_preparation.py
: Functions for loading and preprocessing data.model.py
: Defines the deep learning model architecture.train.py
: Script to train and evaluate the model.evaluate.py
: Functions for evaluating the model performance.utils.py
: Utility functions.
requirements.txt
: List of dependencies.README.md
: Project documentation.
Ensure you have Python 3.10.14 installed on your machine.
-
Clone the repository:
git clone https://github.com/your-username/activity-recognition-model.git cd activity-recognition-model
-
Install the required packages:
pip install -r requirements.txt
Ensure you have the combined_AU-SD.csv
file in the data/
directory.
-
Ensure you have the
combined_AU-SD.csv
file in thedata
directory. -
Run the training script using:
python src/train.py
This module contains functions for loading and preprocessing the data, including:
load_data(file_path)
: Loads the dataset from a CSV file.preprocess_data(df, label_name)
: Encodes labels and prepares features.create_segments_and_labels(df, time_steps, step, label_name)
: Creates segments and labels for time series data.
This module defines the deep learning model architecture:
create_model(input_shape, num_classes)
: Creates and compiles the deep learning model.
This script handles the training process, including cross-validation:
train_and_evaluate(data_path, time_periods, step_distance, label_name, num_splits=2)
: Trains and evaluates the model using K-Fold cross-validation.plot_confusion_matrix(y_true, y_pred, classes)
: Plots the confusion matrix.plot_classification_report(y_true, y_pred, classes)
: Plots the classification report.
This module contains functions for evaluating the model performance (to be filled with relevant evaluation functions if needed).
This module contains utility functions (to be filled with relevant utility functions if needed).
The train.py
script trains the model using K-Fold cross-validation and evaluates its performance. The best model is saved as trained-Model.keras
.
- The script will output the confusion matrix and classification report for the model's performance.
- The best model will be saved as
trained-Model.keras
.
- Ensure that you have the dataset file in the correct directory before running the training script.
- The model architecture and training parameters can be adjusted in the respective scripts as needed.
If you wish to contribute to this project, please follow these steps:
- Fork the repository.
- Create a branch for your feature or bug fix.
- Commit your changes to the branch.
- Submit a pull request.
If you use this project in your research, please cite the following paper:
@inproceedings{imran2024mukhtasir,
title={Mukhtasir-Khail-Net: An Ultra-Efficient Convolutional Neural Network for Sports Activity Recognition with Wearable Inertial Sensors},
author={Imran, Hamza Ali and Muhammad, Shaida and Wazir, Saad and Ikram, Ataul Aziz and Arshad, Obaidullah},
booktitle={2024 4th International Conference on Digital Futures and Transformative Technologies (ICoDT2)},
pages={1--5},
year={2024},
organization={IEEE}
}
This project is licensed under the MIT License. See the LICENSE
file for more details.