The purpose of this program is to capture or process 'interesting' videos and process them for input into Stage 2.
It can capture live images from an RSTP camera or a direct attached one and then generate videos, images and annotation files sutioable for input to Stage 2 and ultimately Stage 3 for training a Neural Net.
Most parts of Simple Tracker is driven by configuration, so are tweakable to an extent
Step 1 - 7 can be performed on both the CPU or GPU, however from Step 7 onwards its CPU only
We recommend using VSCode and runnning the application using the DevContainer. From the VSCode terminal type ./run.sh
to launch the application. Using the Dev Container there is no need to install dependencies as they are all in the container.
You can run a test which will create an outputvideo.mp4 with bounding boxes rendered into the video of the given input video.
Use the run file to launch the application
./run.sh
The full stage 1 capturing froma camera can be run using the following command:
PYTHONPATH="${PYTHONPATH}:." \
SKY360_CONTROLLER=Camera \
SKY360_VISUALIZER=two_by_two \
SKY360_DETECTION_MODE=background_subtraction \
SKY360_FORMAT=mot_stf \
python uap_tracker/main.py
Where:
Other settings can be found in the settings.toml file. Environemnt variables override settings.toml ones.
The output for the STF formatter is in this directory structure
./processed/ # Processed videos
./stf/<video_name>_<section_id>/
annotations.json # Annotations file
video.mp4 # Original video transcoded to mp4 and split for this section
images/
training/ # This will output traning images in incremnents of 32 pixels in size
<frame_id:06>.{image_name>.jpg # Images generated during detection such as 'original', 'grey', 'background_subtraction', 'optical_flow'
{
"track_labels": {
"1": "unknown" # track_id 1 has the label 'unknown'
},
"frames": [
{
"frame": 6,
"annotations": {
"bbox": [
873,
1222,
49,
49
],
"track_id": 1
}
}...