Skip to content

Conversation

@Sarah5567
Copy link
Collaborator

This PR introduces a new deepstream_pipeline_cpu.py that integrates multiple modular CPU-based features into a unified DeepStream pipeline.
The new pipeline includes:

  • Frame-skipping probe (CPU) - compares consecutive frames and drops those without meaningful changes.
  • Background-removal probe (CPU) - applies a modular background-removal step before inference or metadata extraction.
  • nvmsgbroker metadata pipeline - collects, structures, and forwards inference metadata to the database using a dedicated probe.

All components are organized as independent modules, improving clarity, reuse, and maintainability.

closes #138


return pipeline

# Main
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this comment


CLASS_LABELS = load_class_labels()

# Pipeline construction
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this comment

PLANT_LABELS = "/workspace/configs/crop_and_weed_83_classes.txt"

# Load class labels
def load_class_labels() -> List[str]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can create a helper since this function is being used in many places?

except Exception as e:
raise RuntimeError("BackgroundRemovalProbe: failed to fetch/map NvBufSurface") from e

return Gst.PadProbeReturn.OK No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please run linting on this file

@Sarah5567 Sarah5567 merged commit 978c8eb into main Dec 1, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a final pipeline (frame comparison CPU and background removal CPU)

3 participants