加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.m 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
Yikouniao 提交于 2017-09-13 10:59 . Add files
clc; close all; clear
addpath(genpath('utils')); config; mydir = pwd;
cd('C:\gurobi702\win64\matlab'); gurobi_setup; cd(mydir);
% PARAMETERS
%dataset.frame_range = [56001 61000]; % ~5mins
%dataset.frame_range = [263504 356648]; % test-easy
%dataset.frame_range = [227541 263503]; % test-hard
dataset.frame_range = [127720 187540]; % train-mini
dataset.t_window = 5000; % ~40secs
dataset.group_size = 80;
dataset.visualize = false; % internal relation matrices
computeFeatures = true; % set to true to recompute features
tic;
%% LOAD SINGLE CAMERA TRAJECTORIES AND COMPUTE FEATURES
if computeFeatures, [traj, traj_f] = loadAllTraj(dataset); save('traj.mat', 'traj', 'traj_f'); else load('traj.mat'); end %#ok
%% COMPUTE IDENTITIES
startTime = dataset.frame_range(1); endTime = dataset.frame_range(1) + dataset.t_window - 1; % initialize range
while startTime <= dataset.frame_range(2)
% print loop state
clc; fprintf('Window %d...%d\n', startTime, endTime);
% attach tracklets and store trajectories as they finish
traj = linkIdentities(traj , traj_f, startTime, endTime, dataset);
% update loop range
startTime = endTime - dataset.t_window/2;
endTime = startTime + dataset.t_window;
end
toc;
output = parseOutput(traj, dataset.cameras);
dlmwrite('final_output.txt', output, 'delimiter', ' ', 'precision', 6);
%% VISUALIZE RESULTS
%drawOnMap(traj);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化