CSK
A Python implementation of "Exploiting the Circulant Structure of Tracking-by-Detection with Kernels"
Install / Use
/learn @hsjeong5/CSKREADME
CSK Tracker in Python
<p align="center"> <img src="https://github.com/hsjeong5/CSK/blob/master/img/dog1_1.jpg" width="32%"> <img src="https://github.com/hsjeong5/CSK/blob/master/img/sylvester_1.jpg" width="32%"> <img src="https://github.com/hsjeong5/CSK/blob/master/img/faceocc2_1.jpg" width="32%"> </p>This is a Python implementation of "Exploiting the Circulant Structure of Tracking-by-Detection with Kernels" [1]. The above three sequences (Dog1, Sylvester, FaceOcc2) are taken from [2].
Requirements
- Numpy
- Scipy
Sample Code
from csk import *
import numpy as np
from scipy.misc import imread, imsave
import cv2 # (Optional) OpenCV for drawing bounding boxes
length = 472 # sequence length
# 1st frame's groundtruth information
x1 = 125 # position x of the top-left corner of bounding box
y1 = 162 # position y of the top-left corner of bounding box
width = 74 # the width of bounding box
height = 55 # the height of bounding box
sequence_path = "" # your sequence path
save_path = "" # your save path
tracker = csk.CSK() # CSK instance
for i in range(1,length+1): # repeat for all frames
frame = imread(sequence_path+"%04d.jpg"%i)
if i == 1: # 1st frame
print(str(i)+"/"+str(length)) # progress
tracker.init(frame,x1,y1,width,height) # initialize CSK tracker with GT bounding box
imsave(save_path+'%04d.jpg'%i,cv2.rectangle(cv2.cvtColor(frame, cv2.COLOR_GRAY2BGR), \
(x1, y1), (x1+width, y1+height), (0,255,0), 2)) # draw bounding box and save the frame
else: # other frames
print(str(i)+"/"+str(length)) # progress
x1, y1 = tracker.update(frame) # update CSK tracker and output estimated position
imsave(save_path+'%04d.jpg'%i,cv2.rectangle(cv2.cvtColor(frame, cv2.COLOR_GRAY2BGR), \
(x1, y1), (x1+width, y1+height), (0,255,0), 2)) # draw bounding box and save the frame
Precision Plots
<p align="center"> <img src="https://github.com/hsjeong5/CSK/blob/master/img/dog1_precision.png" width="32%"> <img src="https://github.com/hsjeong5/CSK/blob/master/img/sylvester_precision.png" width="32%"> <img src="https://github.com/hsjeong5/CSK/blob/master/img/faceocc2_precision.png" width="32%"> </p>This is precision plots for 3 sequences above (Dog1, Sylvester, FaceOcc2).
References
[1]
Exploiting the Circulant Structure of Tracking-by-Detection with Kernels<br> João F. Henriques, Rui Caseiro, Pedro Martins, Jorge Batista<br> ECCV 2012
[2]
Online Object Tracking: A Benchmark<br> Yi Wu, Jongwoo Lim, Ming-Hsuan Yang<br> CVPR 2013
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
109.4kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
349.0kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
