Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add filter and transcode pipelines #1458

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions client/dive-common/components/RunPipelineMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ export default defineComponent({
case 'utility':
case 'generate':
return 'utilities';
case 'transcode':
return 'transcoders';
default:
return `${pipeType}s`;
}
Expand Down
2 changes: 1 addition & 1 deletion client/platform/desktop/backend/native/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ async function autodiscoverData(settings: Settings): Promise<JsonMeta[]> {
*/
async function getPipelineList(settings: Settings): Promise<Pipelines> {
const pipelinePath = npath.join(settings.viamePath, 'configs/pipelines');
const allowedPatterns = /^detector_.+|^tracker_.+|^generate_.+|^utility_|^measurement_gmm_.+|.*[2,3]-cam.+/;
const allowedPatterns = /^filter_.+|^transcode_.+|^detector_.+|^tracker_.+|^generate_.+|^utility_|^measurement_gmm_.+|.*[2,3]-cam.+/;
const disallowedPatterns = /.*local.*|detector_svm_models.pipe|tracker_svm_models.pipe/;
const exists = await fs.pathExists(pipelinePath);
if (!exists) return {};
Expand Down
11 changes: 10 additions & 1 deletion client/platform/desktop/backend/native/viame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function runPipeline(

//TODO: TEMPORARY FIX FOR DEMO PURPOSES
let requiresInput = false;
if ((/utility_/g).test(pipeline.pipe)) {
if ((/utility_|filter_|transcode_/g).test(pipeline.pipe)) {
requiresInput = true;
}
let groundTruthFileName;
Expand Down Expand Up @@ -126,6 +126,15 @@ async function runPipeline(
command.push(`-s track_writer:file_name="${trackOutput}"`);
}
}

if (runPipelineArgs.pipeline.type === 'filter') {
command.push(`-s kwa_writer:output_directory="${npath.join(jobWorkDir, 'output')}"`);
command.push(`-s image_writer:file_name_prefix="${jobWorkDir}/"`);
}
if (runPipelineArgs.pipeline.type === 'transcode') {
command.push(`-s video_writer:video_filename="${npath.join(jobWorkDir, `${datasetId}.mp4`)}"`);
}

if (requiresInput && !stereoOrMultiCam) {
command.push(`-s detection_reader:file_name="${groundTruthFileName}"`);
command.push(`-s track_reader:file_name="${groundTruthFileName}"`);
Expand Down
Loading