This project was done during an internship within the VAADER (Video Analysis and Architecture Design for Embedded Resources) team in IETR Lab. The internship is part of a project financed by DIGISPORT whose goal is the realization of a system for monitoring a swimming activity in a swimming pool, based on image and video processing algorithms and artificial intelligence.
The main purpose of the project is to study methods of tracking a swimmer in a pool by embedded active vision in order to understand the swimming movement.
During my internship, I was focused on the detection of the swimmer body in the entire image with the use of different image processing algorithms in order to extract the area of the image containing the region of interest. This area is then transferred to the central processing system which performs a pose detection in order to analyse the swimmer’s movement.
I was in charge of the study and comparison in simulation of active vision algorithms allowing the localization of the swimmer in the image.
There 3 different algorithms :
- Color Segmentation
- Gaussian Mixture
- Deep Learning
The projects also contains a database of more than 2,600 images of swimmer with bounding box.
If you want to test by yourself, you have to fork the repository. After, you just have to execute the 2 commands to install all the packages needeed for the project and especially the package src :
pip install -r requirements.txt
pip install -e .
If you want to test the model directly on the database, here are some guidelines :
- Firstly, import the model you want to use and the method IoU_video to see the results :
from src.color_segmentation import ColorBB
from src.gaussian_mixture import GaussianMixtureBB
from src.deep_learning import Swimnet
from src.metrics.model_performance import IoU_video
- Then, load the model :
#### Gaussian Mixture ####
filename = "../models/GMM_model_test_vid_23_full"
model = GaussianMixtureBB(filename, threshold=0.5, graph_cut=False, use_time=False)
#### Deep Learning ####
filename = "../models/mobilenet-V3-small"
model = Swimnet("mobilenet-v3-small")
model.load_state_dict(torch.load(filename))
#### Color Segmentation ####
model = ColorBB("hsv", use_time=False)
- Finally, call the method IoU_video and specify the location of the database
IoU_values, stat_values = IoU_video("../data/images/Testset", "../data/annotations", model, debug=True)
If you want more details about the parameters of each model, there are well defined in the documentation of each class.
\data-- all the data of the project\imagesall the images of the database separated in 3 directories Testset, Trainset and Valset\annotationsall the annotations of the database organized as in images\dataframesall the results of validation tests to find the best parameters\figuresfigures for the report
\docssome documents made for the project\modelsall the saved models\notebooksdifferent notebooks with example of code to illustrate the projects and to have some example of the syntax in order to use the package\reportsthe report made for the project\srcthe package developed for the project. Each method or class is documented\annotationsread_annotations.pymethods to read annotations of the database
\metricsmodel_performance.pymethods to compute metrics and to compare modelsvalidation.pymethods to make validation
\preporcessingbb_tools.pysome tools for bouding boxdataset.pyall the class and methods in order to create the datasetwater_surface_detection.pymethods to detect the surface
color_segmentation.pyclass for the Color segmentationdeep_learning.pyclass for the Deep Learning modelsgaussian_mixture.pyclass for the Gaussian Mixture modelkalman.pyimplementation of the Kalman Filter
\scriptsscripts which used the packagesrequirements.txtall the package you need to install so that you can use the project on your own


