SortNode is a JS binding for SORT: Simple, online, and real-time tracking of multiple objects in a video sequence.

SortNode

npm version CI publish-prebuild

SortNode is a JS binding for SORT: Simple, online, and real-time tracking of multiple objects in a video sequence.

This package is maintained by Techainer

Install

To install this package, make sure you have the following dependencies installed:

  • NodeJS 12+
  • cmake 3.9+
  • OpenCV 3.x.x (Build from source recommened)
  • Eigen 3.x.x (sudo apt-get install -y libeigen3-dev)

Noted that we have provide a Dockerfile contain all 3rd dependencies. To use it, build and run the image:

docker build -t sort .
./docker_run.sh

Or you can reference our github actions CI flow to install dependencies for your own OS.

Then you can install the package from npm:

yarn add [email protected]:@techainer1t/sort-node

Example

The sort-node package contain the object SortNode that can be use to track object detected from a single video or camera.

The SortNode object can be initialize with 4 arguments in the following order:

  • kMinHits: (int) Minimum number of hits before a bounding box was assigned a new track ID (should be 3)
  • kMaxAge: (int) Maximum number of frames to keep alive a track without associated detections
  • kIoUThreshold: (float between 0 and 1) Minimum IOU for match (should be 0.3)
  • kMinConfidence: (float between 0 and 1) Bouding boxes with confidence score less than this value will be ignored

With each frame, you will need to call update method.

This method expect a single arguments that had a the format List[List[float]], which means a list of detected object in that frame. Each object will have the format: [x_top, y_top, width, height, confidence] or [x_top, y_top, width, height, confidence, landmark_x1, landmark_y1, ...] for additional landmark associated with each bounding box

The update method will return a list of tracked object in the format List[Object], each object will have the following structure:

{
    bbox: List[(int) x_top, y_top, width, height],
    track_id: int,
    landmarks: List[(float) x1, y1, x2, y2, ..., x_n, y_n],
}

Please noted that the number of returned object might not be the same as the number of inputed object.

const sortnode = require("@techainer1t/sort-node");
const kMinHits = 3;
const kMaxAge = 1;
const kIoUThreshold = 0.3;
const kMinConfidence = 0.3;
const tracker = sortnode.SortNode(kMinHits, kMaxAge, kIoUThreshold, kMinConfidence);
while (true){
    // Call the object detector
    ...

    // Update the tracker
    tracked = tracker.update(detections);
}

References

The C++ implementation of SORT was written by yasenh from the repo yasenh/sort-cpp

Similar Resources

yangwebrtc is a self-developed rtc architecture supporting Webrtc/Srt/Rtmp, including a variety of video and audio codecs and processing, etc.

yangwebrtc is a self-developed rtc architecture supporting Webrtc/Srt/Rtmp, including a variety of video and audio codecs and processing, etc.

YangWebrtc Overview yangwebrtc是一个自主研发的支持Webrtc/Srt/Rtmp的rtc架构,包含多种视音频编解码和处理等。 支持视频会议、高清录播直播、直播互动等多种视音频应用。 可用于远程教育、远程医疗、指挥调度、安防监控、影视录播、协同办公、直播互动等多种行业应用

Dec 27, 2022

Vireo is a lightweight and versatile video processing library written in C++11

Overview Vireo is a lightweight and versatile video processing library that powers our video transcoding service, deep learning recognition systems an

Jan 2, 2023

Olive is a free non-linear video editor for Windows, macOS, and Linux.

Olive is a free non-linear video editor for Windows, macOS, and Linux.

Olive is a free non-linear video editor for Windows, macOS, and Linux.

Dec 31, 2022

A WFH utility to visually indicate user engagement of audio and video

A WFH utility to visually indicate user engagement of audio and video

DIY: In meeting indicator - WFH Utility The need for in meeting indicator at home So many of you have gotten accustomed to work from home by now. This

Jun 28, 2021

NymphCast is a audio and video casting system with support for custom applications.

NymphCast is a audio and video casting system with support for custom applications.

NymphCast is a software solution which turns your choice of Linux-capable hardware into an audio and video source for a television or powered speakers. It enables the streaming of audio and video over the network from a wide range of client devices, as well as the streaming of internet media to a NymphCast server, controlled by a client device.

Jan 4, 2023

ScanNet is an RGB-D video dataset containing 2.5 million views in more than 1500 scans, annotated with 3D camera poses, surface reconstructions, and instance-level semantic segmentations.

ScanNet is an RGB-D video dataset containing 2.5 million views in more than 1500 scans, annotated with 3D camera poses, surface reconstructions, and instance-level semantic segmentations.

Dec 26, 2022

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.

Video game library manager with support for wide range of 3rd party libraries and game emulation support, providing one unified interface for your games.

An open source video game library manager and launcher with support for 3rd party libraries like Steam, GOG, Origin, Battle.net and Uplay. Includes game emulation support, providing one unified interface for your games.

Jan 3, 2023

🎬 ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video.

🎬 ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video.

ScreenToGif 🎬 screentogif.com This tool allows you to record a selected area of your screen, live feed from your webcam or live drawings from a sketc

Jan 9, 2023

Open h.265 video codec implementation.

Open h.265 video codec implementation.

libde265 - open h.265 codec implementation libde265 is an open source implementation of the h.265 video codec. It is written from scratch and has a pl

Dec 30, 2022
Comments
  • Fix #2: Add support for Landmark

    Fix #2: Add support for Landmark

    Fix #2: Add support for Landmark

    Each object will have the format: [x_top, y_top, width, height, confidence] or [x_top, y_top, width, height, confidence, landmark_x1, landmark_y1, ...] for additional landmark associated with each bounding box

    Each landmark will be kept the same throughout calculation.

  • Fix #4: Allow to set maxAge and IoUThreshold

    Fix #4: Allow to set maxAge and IoUThreshold

    Fix #4: Allow to set maxAge and IoUThreshold like this:

    sortnode.SortNode(kMinHits, kMaxAge, kIoUThreshold, kMinConfidence);
    

    The SortNode object can be initialize with 4 arguments in the following order:

    • kMinHits: (int) Minimum number of hits before a bounding box was assigned a new track ID (should be 3)
    • kMaxAge: (int) Maximum number of frames to keep alive a track without associated detections
    • kIoUThreshold: (float between 0 and 1) Minimum IOU for match (should be 0.3)
    • kMinConfidence: (float between 0 and 1) Bouding boxes with confidence score less than this value will be ignored
  • Add option to include additional information

    Add option to include additional information

    Some object detector often include additional information like landmark other than the bounding box itself.

    sort-node should support that in the next 1.1.0 version.

    cc @b21quocbao

Real-Time Intermediate Flow Estimation for Video Frame Interpolation filter for VapourSynth

Description RIFE filter for VapourSynth, based on rife-ncnn-vulkan. Usage rife.RIFE(clip clip[, int model=0, int gpu_id=auto, int gpu_thread=2, bint t

Dec 24, 2022
OpenShot Video Library (libopenshot) is a free, open-source C++ library dedicated to delivering high quality video editing, animation, and playback solutions to the world

OpenShot Video Library (libopenshot) is a free, open-source C++ library dedicated to delivering high quality video editing, animation, and playback solutions to the world

Jan 4, 2023
Vulkan Video Sample Application demonstrating an end-to-end, all-Vulkan, processing of h.264/5 compressed video content.
Vulkan Video Sample Application demonstrating an end-to-end, all-Vulkan, processing of h.264/5 compressed video content.

This project is a Vulkan Video Sample Application demonstrating an end-to-end, all-Vulkan, processing of h.264/5 compressed video content. The application decodes the h.264/5 compressed content using an HW accelerated decoder, the decoded YCbCr frames are processed with Vulkan Graphics and then presented via the Vulkan WSI.

Dec 15, 2022
Minimalist video maker -- simplify your music score video making process!

VisualScores 极简视频制作程序,简化你的乐谱视频制作! 如果需要编译,请解压 lib 文件夹中压缩包。 使用前请参考 manual 文件夹中的用户手册。 请勿修改、移动或删除 resource 文件夹中的任何文件。 VisualScores Minimalist video maker

Sep 7, 2022
SRS is a simple, high efficiency and realtime video server, supports RTMP/WebRTC/HLS/HTTP-FLV/SRT/GB28181.
SRS is a simple, high efficiency and realtime video server, supports RTMP/WebRTC/HLS/HTTP-FLV/SRT/GB28181.

SRS is a simple, high efficiency and realtime video server, supports RTMP/WebRTC/HLS/HTTP-FLV/SRT/GB28181.

Jan 5, 2023
Restream your stream to multiple destinations

RTMP Restreamer Portable RTMP restreaming tool. Starts server, accepts any stream and restreams it to multiple destinations without reencoding. Usage

Feb 14, 2022
a simple example of video streaming with a ESP32 AI Thinker
a simple example of video streaming with a ESP32 AI Thinker

esp32-video-streaming its a simple camera system that im trying to make for fun I want to make an async server but idk it doesnt works correctly and w

Mar 9, 2022
Sentry-Picam is a simple wildlife / security camera solution for the Raspberry Pi Zero W, providing 1080p/30fps motion activated H.264 video capture.
Sentry-Picam is a simple wildlife / security camera solution for the Raspberry Pi Zero W, providing 1080p/30fps motion activated H.264 video capture.

Sentry-Picam is a simple wildlife / security camera solution for the Raspberry Pi Zero W, providing 1080p/30fps motion activated H.264 video capture.

Oct 9, 2022
A simple example showing how to render a video with libvlc + raylib.
A simple example showing how to render a video with libvlc + raylib.

Hey! I bet you have been trying to render and control a video with raylib for a long long time. Don't you think you should at least buy me a beer? Wha

Nov 8, 2022
DTV is a library that provides a simple interface for generating video files from a C++ application
DTV is a library that provides a simple interface for generating video files from a C++ application

Direct to Video (DTV) What does DTV do? DTV is a library that provides a simple interface for generating video files from a C++ application. It uses F

Dec 30, 2022