Anonymizer Toolchain¶
The Anonymizer is a command-line toolchain designed to blur individuals in videos (only person objects at the moment). It supports configurable blur levels and allows for excluding specific individuals from anonymization.
Using the Anonymizer toolchain requires basic Linux knowledge, as it involves running various command-line tools.
Before you begin
-
Ensure that Professional is installed and that you can access the host machine via SSH or locally, from the terminal.
-
Docker will require root privileges. If you are not logged in as the root user, prepend
sudo
to the docker commands provided in this guide.
The anonymization process takes a video file as input and produces an anonymized video file as output. Let's examine the process in detail.
1. Convert the input video¶
Some videos use proprietary codecs. Use tools provided by your Video Management System (VMS) to convert and export the video to a portable format. The preferred codec is H.264 with an .mp4 container.
Alternatively, you can use ffmpeg
to perform the conversion.
Example command to convert a video using ffmpeg | |
---|---|
2. Run the Indexer¶
Objects are assigned unique IDs to differentiate and track them. Run the Indexer to generate a debug video where the detected IDs are visible.
Open a terminal or SSH session to the host machine where Professional is installed. Then ensure the Triton Inference Server is running by executing the following command:
Assuming the input video is located at /home/user1/anonim/in.mp4
, run the following command:
The indexing process may take several minutes, depending on the size of the input video. Progress information will be displayed in the console.
3. Prepare an exclusion list (optional)¶
Objects are assigned unique IDs in the debug video. To exclude specific individuals from anonymization, create a text file containing these IDs, with each ID separated by whitespace. For improved readability, it's recommended to place each ID on a new line. For example:
Save the exclusion file to the location where the input video is located, e.g.:
/home/user1/anonim/exclude.txt
4. Run the Anonymizer¶
The Anonymizer takes the input video, detection results from the indexing step, and the exclusion list (if any) to generate the anonymized video.
To perform the anonymization step, run the following command:
Info
The --exclude
flag is optional. If you don't want to exclude any individuals, omit it from the command.
Once completed, the output video will be located at:
/home/user1/anonim/out.mp4
5. Error handling¶
In some cases, the output video may contain errors (e.g. some objects not blurred). These can be corrected with a video editing tool, such as Adobe Premiere Pro. See an example tutorial for blurring with it here.