diff --git a/README.md b/README.md index 39152fc..e7f0ba1 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Check out the [repository](https://aka.ms/Microsoft-Rocket-Video-Analytics-Platf * Prepare a configuration file (should be placed into `\cfg\`) used in line-based counting/alerting and cascaded DNN calls. Each line in the file defines a line-of-interest with the format below. ` ` A line configuration file `sample.txt` manually created based on `sample.mp4` is also included in the folder `\cfg\`. -To learn more about configuring your own lines of interest, please visit [this page](https://github.com/Azure/live-video-analytics/blob/master/ref-apps/rocket/notebooks/line_configuration.md). +To learn more about configuring your own lines of interest, please visit [this page](./documents/line_configuration.md). #### Build on Windows * Run `Config.bat` before the first time you run Rocket to download pre-compiled OpenCV and TensorFlow binaries as well as Darknet YOLO weights files. It may take few minutes depending on your network status. Proceed only when all downloads finish. YOLOv3 and Tiny YOLOv3 are already included in Rocket. You can plug-in other [YOLO models](https://pjreddie.com/darknet/yolo/) as you wish. diff --git a/documents/images/_line_drawing_1.png b/documents/images/_line_drawing_1.png new file mode 100644 index 0000000..6a3082d Binary files /dev/null and b/documents/images/_line_drawing_1.png differ diff --git a/documents/images/_line_drawing_2.png b/documents/images/_line_drawing_2.png new file mode 100644 index 0000000..772ea9c Binary files /dev/null and b/documents/images/_line_drawing_2.png differ diff --git a/documents/images/_line_drawing_3.png b/documents/images/_line_drawing_3.png new file mode 100644 index 0000000..e4ee48e Binary files /dev/null and b/documents/images/_line_drawing_3.png differ diff --git a/documents/images/_line_sample.png b/documents/images/_line_sample.png new file mode 100644 index 0000000..5b13cfd Binary files /dev/null and b/documents/images/_line_sample.png differ diff --git a/documents/line_configuration.md b/documents/line_configuration.md new file mode 100644 index 0000000..b223530 --- /dev/null +++ b/documents/line_configuration.md @@ -0,0 +1,29 @@ +# Configure lines of interest + +Rocket enables counting and alerting when objects cross lines of interest in the frame, e.g., cars entering a driveway or people walking into the shop. Rocket takes a line-file as input for its line-based counting/alerting and cascaded DNN calls. + +## Line format and specification + +Each line in the file defines a line-of-interest with the following format. The fields in each line are separated by tabs. + + ` ` + +The fields signify the following: +* line_count_name - unique string to name the line. +* number_of_lines - this must be always set to 1. +* x_1, y_1, x_2, y_2 - the X and Y coordinates of the line's endpoints. +* overlap_threshold - this is the fraction of the line that the object is expected to cover for the count/alert to be triggered. + +Here is a [sample line configuration file](https://aka.ms/linesample) manually created for [rocket-sample.mkv](https://aka.ms/lva-rocket-videosample) with two lines of interest. The two lines are also shown in the picture below, which is a frame from the `rocket-sample.mkv` video. The first line in the [sample configuration file](https://aka.ms/linesample), for instance, lists the coordinates of the two endpoints of the line `(209, 101)` and `(266, 101)`. A count will be triggered when the object's overlap with this line is at least `0.3` of the line's length. +sampleline + +An easy way to mark the lines is to take a "snapshot" from the video, say using VLC, mark the lines on the snapshot frame, and then list the coordinates and parameters of the line in the format specified above to create the line-file. We include helpful snapshots below for marking the lines using VLC and Gnome Paint Drawing Editor on Ubuntu. On Windows, similar steps can be taken by VLC and Paint. + +Taking snapshot on VLC +sampleline + +Opening the snapshot from Pictures folder +sampleline + +Drawing lines in Gnome Paint Drawing Editor. Note the coordinates at the bottom as the cursor moves. +sampleline \ No newline at end of file