You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implementation with Command Line Interface of the work done for my degree final project "Appereance and context information combination for re-identificaton in sports competitions" ("Combinación de apariencia e información de contexto para la re-identificación en competiciones deportivas").
With this implementation you can:
Run the studied body detectors and get the body images or bounding boxes of the bodies in a given image.
Generate a representative embedding from a body image using studied body embedding generators.
Compute the CMC curve of a given gallery set and query set, using one of the proposed heuristics.
Test the whole system from a video feed, using a specified gallery set.
Requirements
Python >= 3.7.
Pip >= 20.
Project set up
In your system or virtual Python environment, install the requirements/dependencies:
pip install -r requirements.txt
Then you can use it by executing the personIdentifier.py script:
./personReidentifier.py
CLI interface manual
Program configuration
Option
Description
-h, --help
Shows the help message and exit.
--silent
Runs program in silent mode (no verbose).
Embedding generation configuration
Option
Description
--alignedreid
Uses AlignedReId++ for body embedding generation.
--abd
Uses Attentive but Diverse Network for body embedding generation.
--embeddingGeneratorWeightsweights_file
Embedding generator weights file.
--embeddingGeneratorClassesclasses_number
Embedding generator number of classes.
Detection configuration
Option
Description
--mtcnn
Uses MTCNN for face detection.
--yolo
Uses YOLOv3 for person detection.
--faster
Uses FasterRCNN for person detection.
--mask
Uses `MaskRCNN for person detection.
--bodyDetectorWeightsweights_path
Body detector weights file.
--bodyDetectorConfigconfiguration_file_path
Body detector configuration file. Only needed for YOLOv3.
--detectionThresholdthreshold_float
Specifies the detection threshold. Default value: 0.8
Features
Embedding generation
Option
Description
--embeddingimage_file
Returns embedding of the given body. Default embedding generator: AlignedReId++.
--savePathsave_embedding_path
Embedding save path (use .h5 extension).
Body detection
Option
Description
--detectionimage_path
Returns bodies of the given image in the specified folder using --saveFolder option. Default body detector: MaskRCNN.
--boundingBox
Draws bounding boxes in image instead of getting the body image.
--saveFolderfolder_path
Specifies the save folder for the --detection option.
Returns the CMC curve discrete values of the given query and gallery.
--plot
Plots the calculated CMC curve.
--idsids_file_path
The ids list files.
--queryquery_directory_path
The query embeddings directory.
--gallerygallery_directory_path
The gallery embeddings directory.
--queryLocationlocation_number
The choosen query location in the dataset.
--galleryLocationlocation_number
The choosen gallery location in the dataset.
--oneIndexed
Check this option if the dataset indexes starts at 1.
--topNumtop_number
Top number of CMC curve.
Heuristic configuration
Time heuristic
Option
Description
--timeHeuristic
Display the CMC curve using time heuristic of the given query and gallery.
--raceRankingrank_file_path
Previous race ranking file for CMC curve for heuristics.
--windowSizeinteger
Window size for time heuristic. Default value: 30.
--shiftSizeinteger
Shift size for time heuristic. Default value: 1.
--shiftPropfloat
Shift proportion for time heuristic. Default value: 1.
Space heuristic
Option
Description
--spaceHeuristic
Display the CMC curve using space heuristic of the given query and gallery.
--fpsinteger
FPS for space heuristic. Default value: 5.
--timeoutfloat
Timeout for space heuristic. Default value: 10.
Complete system test
Option
Description
--videovideo_path
Runs system with specified video file.
--camera
Runs system using system camera.
Open set based problem parameters (experimental)
This features has not been tested and were implemented for experimental intentions only. Further work in this area can be made, as told in the project report.
Option
Description
--openWorldThresholdfloat
The minimum value to consider an identity as equal as one in the gallery.