sef 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sef-0.2.0/LICENSE +13 -0
- sef-0.2.0/PKG-INFO +52 -0
- sef-0.2.0/README.md +431 -0
- sef-0.2.0/pyproject.toml +82 -0
- sef-0.2.0/sef/__init__.py +62 -0
- sef-0.2.0/sef/__main__.py +5 -0
- sef-0.2.0/sef/api/__init__.py +27 -0
- sef-0.2.0/sef/api/config.py +159 -0
- sef-0.2.0/sef/api/decorators.py +143 -0
- sef-0.2.0/sef/api/function_adapters.py +129 -0
- sef-0.2.0/sef/api/orchestrator.py +203 -0
- sef-0.2.0/sef/api/pipeline.py +300 -0
- sef-0.2.0/sef/api/registry.py +65 -0
- sef-0.2.0/sef/api/stage_refs.py +211 -0
- sef-0.2.0/sef/builtin/Main.py +83 -0
- sef-0.2.0/sef/builtin/__init__.py +28 -0
- sef-0.2.0/sef/builtin/_optional_dependencies.py +71 -0
- sef-0.2.0/sef/builtin/analyzers/ArUco/ArucoMarkerDisplacementAnalyzer.py +159 -0
- sef-0.2.0/sef/builtin/analyzers/ArUco/ArucoMarkerRelativeMotionAnalyzer.py +170 -0
- sef-0.2.0/sef/builtin/analyzers/ArUco/__init__.py +0 -0
- sef-0.2.0/sef/builtin/analyzers/COCO_pose/COCOPoseStreamAnalyzer.py +152 -0
- sef-0.2.0/sef/builtin/analyzers/COCO_pose/__init__.py +0 -0
- sef-0.2.0/sef/builtin/analyzers/NoAnalyzer.py +34 -0
- sef-0.2.0/sef/builtin/analyzers/multiple_tracker/MultiObjectBarrierCountingAnalyzer.py +93 -0
- sef-0.2.0/sef/builtin/analyzers/multiple_tracker/MultipleDistanceAnalyzer.py +61 -0
- sef-0.2.0/sef/builtin/analyzers/multiple_tracker/__init__.py +0 -0
- sef-0.2.0/sef/builtin/analyzers/optical_flow/DenseOpticalFlowVectorFieldAnalyzer.py +80 -0
- sef-0.2.0/sef/builtin/analyzers/optical_flow/SparseOpticalFlowTrajectoryAnalyzer.py +81 -0
- sef-0.2.0/sef/builtin/analyzers/optical_flow/__init__.py +0 -0
- sef-0.2.0/sef/builtin/analyzers/playback/TrackingPlaybackAnalyzer.py +115 -0
- sef-0.2.0/sef/builtin/analyzers/playback/__init__.py +0 -0
- sef-0.2.0/sef/builtin/analyzers/single_tracker/HoriziontalPositionAnalyzer.py +41 -0
- sef-0.2.0/sef/builtin/analyzers/single_tracker/HorizontalFrequencyAnalyzer.py +53 -0
- sef-0.2.0/sef/builtin/analyzers/single_tracker/HorizontalVelocityAnalyzer.py +60 -0
- sef-0.2.0/sef/builtin/analyzers/single_tracker/VerticalFrequencyAnalyzer.py +53 -0
- sef-0.2.0/sef/builtin/analyzers/single_tracker/VerticalPositionAnalyzer.py +41 -0
- sef-0.2.0/sef/builtin/analyzers/single_tracker/VerticalPositionStreamAnalyzer.py +78 -0
- sef-0.2.0/sef/builtin/analyzers/single_tracker/VerticalVelocityAnalyzer.py +60 -0
- sef-0.2.0/sef/builtin/analyzers/single_tracker/__init__.py +0 -0
- sef-0.2.0/sef/builtin/branching_rules/NewTrackBranchingRule.py +57 -0
- sef-0.2.0/sef/builtin/exporters/IntermediateFrameArtifactExporter.py +98 -0
- sef-0.2.0/sef/builtin/exporters/OpenCVFrameBufferVideoExporter.py +179 -0
- sef-0.2.0/sef/builtin/frame_extractors/OpenCVBufferedFrameExtractor.py +104 -0
- sef-0.2.0/sef/builtin/frame_extractors/OpenCVWebcamFrameExtractor.py +125 -0
- sef-0.2.0/sef/builtin/frame_processors/ColorStabilizationFrameProcessor.py +786 -0
- sef-0.2.0/sef/builtin/frame_processors/DynamicObjectRemovalFrameProcessor.py +3 -0
- sef-0.2.0/sef/builtin/frame_processors/OpenCV/OpenCVBackgroundReplacementFrameProcessor.py +79 -0
- sef-0.2.0/sef/builtin/frame_processors/OpenCV/OpenCVBackgroundSubtractionFrameProcessor.py +93 -0
- sef-0.2.0/sef/builtin/frame_processors/OpenCV/OpenCVDynamicBackgroundReplacementFrameProcessor.py +120 -0
- sef-0.2.0/sef/builtin/frame_processors/OpenCV/OpenCVDynamicInpaintFrameProcessor.py +134 -0
- sef-0.2.0/sef/builtin/frame_processors/OpenCV/OpenCVGrayFrameProcessor.py +24 -0
- sef-0.2.0/sef/builtin/frame_processors/OpenCV/OpenCVHistogramEqualizationFrameProcessor.py +34 -0
- sef-0.2.0/sef/builtin/frame_processors/OpenCV/OpenCVInpaintFrameProcessor.py +75 -0
- sef-0.2.0/sef/builtin/frame_processors/OpenCV/OpenCVResizeFrameProcessor.py +39 -0
- sef-0.2.0/sef/builtin/frame_processors/OpenCV/OpenCVRotateFrameProcessor.py +49 -0
- sef-0.2.0/sef/builtin/frame_processors/OpenCV/OpenCVZoomFrameProcessor.py +56 -0
- sef-0.2.0/sef/builtin/frame_processors/OpenCV/__init__.py +0 -0
- sef-0.2.0/sef/builtin/frame_processors/RealtimeFrameTapProcessor.py +88 -0
- sef-0.2.0/sef/builtin/frame_processors/SmoothingFrameProcessor.py +61 -0
- sef-0.2.0/sef/builtin/frame_processors/__init__.py +0 -0
- sef-0.2.0/sef/builtin/frame_processors/dynamic_object_removal/__init__.py +34 -0
- sef-0.2.0/sef/builtin/frame_processors/dynamic_object_removal/background_estimator.py +98 -0
- sef-0.2.0/sef/builtin/frame_processors/dynamic_object_removal/config.py +116 -0
- sef-0.2.0/sef/builtin/frame_processors/dynamic_object_removal/foreground_mask_extractor.py +56 -0
- sef-0.2.0/sef/builtin/frame_processors/dynamic_object_removal/mask_refiner.py +93 -0
- sef-0.2.0/sef/builtin/frame_processors/dynamic_object_removal/processor.py +374 -0
- sef-0.2.0/sef/builtin/frame_processors/dynamic_object_removal/region_reconstructor.py +42 -0
- sef-0.2.0/sef/builtin/frame_processors/motion_magnification/PhaseMagnificationFrameProcessor.py +488 -0
- sef-0.2.0/sef/builtin/frame_processors/motion_magnification/__init__.py +0 -0
- sef-0.2.0/sef/builtin/live_analyzers/LiveVerticalPositionAnalyzer.py +46 -0
- sef-0.2.0/sef/builtin/live_analyzers/__init__.py +0 -0
- sef-0.2.0/sef/builtin/registry.py +196 -0
- sef-0.2.0/sef/builtin/retry_policies/ExponentialBackoffRetryPolicy.py +53 -0
- sef-0.2.0/sef/builtin/retry_policies/FixedRetryPolicy.py +30 -0
- sef-0.2.0/sef/builtin/retry_policies/NoRetryPolicy.py +3 -0
- sef-0.2.0/sef/builtin/retry_policies/__init__.py +9 -0
- sef-0.2.0/sef/builtin/signal_cleaners/ArUco/ArucoTemporalStabilizerCleaner.py +242 -0
- sef-0.2.0/sef/builtin/signal_cleaners/ArUco/__init__.py +0 -0
- sef-0.2.0/sef/builtin/signal_cleaners/COCO_pose/COCOSkeletonNormalizationSignalCleaner.py +109 -0
- sef-0.2.0/sef/builtin/signal_cleaners/COCO_pose/__init__.py +0 -0
- sef-0.2.0/sef/builtin/signal_cleaners/__init__.py +0 -0
- sef-0.2.0/sef/builtin/signal_cleaners/optical_flow/OpticalFlowOutlierCleaner.py +76 -0
- sef-0.2.0/sef/builtin/signal_cleaners/optical_flow/__init__.py +0 -0
- sef-0.2.0/sef/builtin/signal_cleaners/single_tracker/MovingAverageCleaner.py +46 -0
- sef-0.2.0/sef/builtin/signal_cleaners/single_tracker/MovingAverageStreamSignalCleaner.py +72 -0
- sef-0.2.0/sef/builtin/signal_cleaners/single_tracker/OutlierRejectionCleaner.py +78 -0
- sef-0.2.0/sef/builtin/signal_cleaners/single_tracker/SignalWidenerCleaner.py +43 -0
- sef-0.2.0/sef/builtin/signal_cleaners/single_tracker/__init__.py +0 -0
- sef-0.2.0/sef/builtin/signal_extractors/ArucoMarkerSignalExtractor.py +721 -0
- sef-0.2.0/sef/builtin/signal_extractors/NoSignalExtractor.py +49 -0
- sef-0.2.0/sef/builtin/signal_extractors/OpenCVBufferedSignalExtractor.py +147 -0
- sef-0.2.0/sef/builtin/signal_extractors/OpenCVDenseOpticalFlowSignalExtractor.py +133 -0
- sef-0.2.0/sef/builtin/signal_extractors/OpenCVMultiManualSignalExtractor.py +157 -0
- sef-0.2.0/sef/builtin/signal_extractors/OpenCVMultiObjectSignalExtractor.py +456 -0
- sef-0.2.0/sef/builtin/signal_extractors/OpenCVSparseOpticalFlowSignalExtractor.py +197 -0
- sef-0.2.0/sef/builtin/signal_extractors/OpenCVStreamSignalExtractor.py +162 -0
- sef-0.2.0/sef/builtin/signal_extractors/YOLOSkeletonCOCOStreamSignalExtractor.py +170 -0
- sef-0.2.0/sef/builtin/visualizers/ArUco/ArucoAnnotatedVideoVisualizer.py +129 -0
- sef-0.2.0/sef/builtin/visualizers/ArUco/__init__.py +0 -0
- sef-0.2.0/sef/builtin/visualizers/COCO_pose/COCOPoseFrameRenderer.py +167 -0
- sef-0.2.0/sef/builtin/visualizers/COCO_pose/OpenCVCOCOPoseRealtimeVisualizer.py +184 -0
- sef-0.2.0/sef/builtin/visualizers/COCO_pose/OpenCVCOCOTennisPoseRealtimeVisualizer.py +192 -0
- sef-0.2.0/sef/builtin/visualizers/COCO_pose/RealtimeCOCOPoseFrameVisualizer.py +118 -0
- sef-0.2.0/sef/builtin/visualizers/COCO_pose/__init__.py +0 -0
- sef-0.2.0/sef/builtin/visualizers/Matplotlib/MatplotlibArtifactVisualizer.py +67 -0
- sef-0.2.0/sef/builtin/visualizers/Matplotlib/MatplotlibArucoMotionVisualizer.py +178 -0
- sef-0.2.0/sef/builtin/visualizers/Matplotlib/MatplotlibFunctionStreamVisualizer.py +111 -0
- sef-0.2.0/sef/builtin/visualizers/Matplotlib/MatplotlibFunctionVisualizer.py +68 -0
- sef-0.2.0/sef/builtin/visualizers/Matplotlib/MatplotlibHeatmapVisualizer.py +86 -0
- sef-0.2.0/sef/builtin/visualizers/Matplotlib/MatplotlibHistogramVisualizer.py +57 -0
- sef-0.2.0/sef/builtin/visualizers/Matplotlib/MatplotlibTrajectoryVisualizer.py +83 -0
- sef-0.2.0/sef/builtin/visualizers/Matplotlib/MatplotlibVectorFieldVisualizer.py +93 -0
- sef-0.2.0/sef/builtin/visualizers/Matplotlib/__init__.py +0 -0
- sef-0.2.0/sef/builtin/visualizers/TrackingVideoVisualizer.py +652 -0
- sef-0.2.0/sef/builtin/visualizers/__init__.py +0 -0
- sef-0.2.0/sef/builtin/visualizers/intermediate_frames/IntermediateFramesGridVisualizer.py +94 -0
- sef-0.2.0/sef/builtin/visualizers/intermediate_frames/IntermediateFramesVisualizer.py +141 -0
- sef-0.2.0/sef/builtin/visualizers/intermediate_frames/__init__.py +0 -0
- sef-0.2.0/sef/cli/__init__.py +5 -0
- sef-0.2.0/sef/cli/__main__.py +5 -0
- sef-0.2.0/sef/cli/commands.py +1551 -0
- sef-0.2.0/sef/cli/output.py +97 -0
- sef-0.2.0/sef/core/__init__.py +63 -0
- sef-0.2.0/sef/core/_lazy_exports.py +31 -0
- sef-0.2.0/sef/core/artifacts/Frame.py +38 -0
- sef-0.2.0/sef/core/artifacts/Signal.py +18 -0
- sef-0.2.0/sef/core/artifacts/__init__.py +162 -0
- sef-0.2.0/sef/core/artifacts/buffer/DataBuffer.py +154 -0
- sef-0.2.0/sef/core/artifacts/buffer/FrameBuffer.py +148 -0
- sef-0.2.0/sef/core/artifacts/buffer/SignalBuffer.py +172 -0
- sef-0.2.0/sef/core/artifacts/buffer/__init__.py +36 -0
- sef-0.2.0/sef/core/artifacts/data/ArucoDisplacementData.py +238 -0
- sef-0.2.0/sef/core/artifacts/data/ArucoRelativeMotionData.py +38 -0
- sef-0.2.0/sef/core/artifacts/data/COCOPoseFrameData.py +31 -0
- sef-0.2.0/sef/core/artifacts/data/COCOPoseTennisFrameData.py +32 -0
- sef-0.2.0/sef/core/artifacts/data/CategoryData.py +24 -0
- sef-0.2.0/sef/core/artifacts/data/NoData.py +10 -0
- sef-0.2.0/sef/core/artifacts/data/TrackingPlaybackData.py +66 -0
- sef-0.2.0/sef/core/artifacts/data/TrajectoryData.py +23 -0
- sef-0.2.0/sef/core/artifacts/data/TwoDimGraphData.py +19 -0
- sef-0.2.0/sef/core/artifacts/data/TwoDimPointData.py +19 -0
- sef-0.2.0/sef/core/artifacts/data/VectorFieldGraphData.py +26 -0
- sef-0.2.0/sef/core/artifacts/data/__init__.py +89 -0
- sef-0.2.0/sef/core/artifacts/intermediate_frame/IntermediateFrameArtifacts.py +111 -0
- sef-0.2.0/sef/core/artifacts/intermediate_frame/IntermediateFrameComposition.py +336 -0
- sef-0.2.0/sef/core/artifacts/intermediate_frame/__init__.py +67 -0
- sef-0.2.0/sef/core/artifacts/mask/MaskArtifacts.py +433 -0
- sef-0.2.0/sef/core/artifacts/mask/MaskOperations.py +128 -0
- sef-0.2.0/sef/core/artifacts/mask/__init__.py +47 -0
- sef-0.2.0/sef/core/artifacts/signal_sample/ArucoMarkerSignalSample.py +49 -0
- sef-0.2.0/sef/core/artifacts/signal_sample/BoxSignalSample.py +20 -0
- sef-0.2.0/sef/core/artifacts/signal_sample/COCOSkeletonSignalSample.py +32 -0
- sef-0.2.0/sef/core/artifacts/signal_sample/DenseOpticalFlowSignalSample.py +35 -0
- sef-0.2.0/sef/core/artifacts/signal_sample/MultiManualSignalSample.py +15 -0
- sef-0.2.0/sef/core/artifacts/signal_sample/MultiObjectSignalSample.py +34 -0
- sef-0.2.0/sef/core/artifacts/signal_sample/SparseOpticalFlowSignalSample.py +25 -0
- sef-0.2.0/sef/core/artifacts/signal_sample/__init__.py +64 -0
- sef-0.2.0/sef/core/enum/FrameRotation.py +7 -0
- sef-0.2.0/sef/core/errors.py +276 -0
- sef-0.2.0/sef/core/events/Event.py +54 -0
- sef-0.2.0/sef/core/events/EventBus.py +85 -0
- sef-0.2.0/sef/core/events/PipelineEvent.py +114 -0
- sef-0.2.0/sef/core/events/PipelineLifecycleEvent.py +66 -0
- sef-0.2.0/sef/core/events/__init__.py +49 -0
- sef-0.2.0/sef/core/interfaces/BufferContracts.py +84 -0
- sef-0.2.0/sef/core/interfaces/IAnalyzer.py +40 -0
- sef-0.2.0/sef/core/interfaces/IData.py +5 -0
- sef-0.2.0/sef/core/interfaces/IEventEmitter.py +110 -0
- sef-0.2.0/sef/core/interfaces/IFrameBufferProcessor.py +44 -0
- sef-0.2.0/sef/core/interfaces/IFrameExporter.py +71 -0
- sef-0.2.0/sef/core/interfaces/IFrameExtractor.py +48 -0
- sef-0.2.0/sef/core/interfaces/ILiveAnalyzer.py +19 -0
- sef-0.2.0/sef/core/interfaces/ISignal.py +48 -0
- sef-0.2.0/sef/core/interfaces/ISignalCleaner.py +37 -0
- sef-0.2.0/sef/core/interfaces/ISignalExtractor.py +41 -0
- sef-0.2.0/sef/core/interfaces/ISignalSample.py +30 -0
- sef-0.2.0/sef/core/interfaces/ISingleFrameProcessor.py +35 -0
- sef-0.2.0/sef/core/interfaces/IVisualizer.py +48 -0
- sef-0.2.0/sef/core/interfaces/StageCapabilities.py +71 -0
- sef-0.2.0/sef/core/interfaces/StreamingContracts.py +138 -0
- sef-0.2.0/sef/core/interfaces/__init__.py +96 -0
- sef-0.2.0/sef/core/interfaces/pipeline/IBranchingRule.py +73 -0
- sef-0.2.0/sef/core/interfaces/pipeline/IEventBus.py +55 -0
- sef-0.2.0/sef/core/interfaces/pipeline/IPipelineFactory.py +36 -0
- sef-0.2.0/sef/core/interfaces/pipeline/IPipelineMonitor.py +55 -0
- sef-0.2.0/sef/core/interfaces/pipeline/IPipelineOutputStore.py +29 -0
- sef-0.2.0/sef/core/interfaces/pipeline/IPipelineRunner.py +52 -0
- sef-0.2.0/sef/core/interfaces/pipeline/IPipelineValidator.py +22 -0
- sef-0.2.0/sef/core/interfaces/pipeline/IRetryPolicy.py +55 -0
- sef-0.2.0/sef/core/interfaces/pipeline/__init__.py +66 -0
- sef-0.2.0/sef/core/pipeline/AnalysisSegmentExecutor.py +359 -0
- sef-0.2.0/sef/core/pipeline/BranchingCoordinator.py +110 -0
- sef-0.2.0/sef/core/pipeline/ConfigPipelineBuilder.py +403 -0
- sef-0.2.0/sef/core/pipeline/DefaultPipelineFactory.py +31 -0
- sef-0.2.0/sef/core/pipeline/FluentPipelineBuilder.py +176 -0
- sef-0.2.0/sef/core/pipeline/FrameProcessingStage.py +78 -0
- sef-0.2.0/sef/core/pipeline/FrameSegmentExecutor.py +303 -0
- sef-0.2.0/sef/core/pipeline/InMemoryPipelineMonitor.py +91 -0
- sef-0.2.0/sef/core/pipeline/InMemoryPipelineOutputStore.py +33 -0
- sef-0.2.0/sef/core/pipeline/IntermediateFrameCapture.py +210 -0
- sef-0.2.0/sef/core/pipeline/LatencyPolicy.py +331 -0
- sef-0.2.0/sef/core/pipeline/NoRetryPolicy.py +17 -0
- sef-0.2.0/sef/core/pipeline/Pipeline.py +152 -0
- sef-0.2.0/sef/core/pipeline/PipelineBoundaryMaterializer.py +125 -0
- sef-0.2.0/sef/core/pipeline/PipelineBuffers.py +48 -0
- sef-0.2.0/sef/core/pipeline/PipelineCodeExporter.py +102 -0
- sef-0.2.0/sef/core/pipeline/PipelineComponentCapabilities.py +89 -0
- sef-0.2.0/sef/core/pipeline/PipelineConfigExporter.py +533 -0
- sef-0.2.0/sef/core/pipeline/PipelineConfigVersioning.py +226 -0
- sef-0.2.0/sef/core/pipeline/PipelineContext.py +210 -0
- sef-0.2.0/sef/core/pipeline/PipelineErrors.py +49 -0
- sef-0.2.0/sef/core/pipeline/PipelineEventInjector.py +57 -0
- sef-0.2.0/sef/core/pipeline/PipelineExecutionLookahead.py +64 -0
- sef-0.2.0/sef/core/pipeline/PipelineExecutionPlan.py +144 -0
- sef-0.2.0/sef/core/pipeline/PipelineExecutionPlanner.py +285 -0
- sef-0.2.0/sef/core/pipeline/PipelineExecutionPolicy.py +226 -0
- sef-0.2.0/sef/core/pipeline/PipelineExecutionResources.py +45 -0
- sef-0.2.0/sef/core/pipeline/PipelineExecutionResult.py +25 -0
- sef-0.2.0/sef/core/pipeline/PipelineExportUtils.py +168 -0
- sef-0.2.0/sef/core/pipeline/PipelineOrchestrator.py +188 -0
- sef-0.2.0/sef/core/pipeline/PipelineOutputAssembler.py +94 -0
- sef-0.2.0/sef/core/pipeline/PipelineRunSnapshot.py +33 -0
- sef-0.2.0/sef/core/pipeline/PipelineRuntimeState.py +40 -0
- sef-0.2.0/sef/core/pipeline/PipelineStageExecutor.py +44 -0
- sef-0.2.0/sef/core/pipeline/SegmentedPipelineExecutor.py +147 -0
- sef-0.2.0/sef/core/pipeline/SignalSegmentExecutor.py +172 -0
- sef-0.2.0/sef/core/pipeline/SingleFrameProcessorAdapter.py +208 -0
- sef-0.2.0/sef/core/pipeline/StreamRuntimeConfig.py +122 -0
- sef-0.2.0/sef/core/pipeline/ThreadedPipelineRunner.py +322 -0
- sef-0.2.0/sef/core/pipeline/VisualizationExecutor.py +178 -0
- sef-0.2.0/sef/core/pipeline/VisualizerBinding.py +53 -0
- sef-0.2.0/sef/core/pipeline/__init__.py +99 -0
- sef-0.2.0/sef/core/plugins/PluginRegistry.py +348 -0
- sef-0.2.0/sef/core/plugins/__init__.py +19 -0
- sef-0.2.0/sef/core/pose/COCOSkeletonNormalizer.py +164 -0
- sef-0.2.0/sef/core/pose/__init__.py +11 -0
- sef-0.2.0/sef/core/realtime/IRealtimeFrameSink.py +21 -0
- sef-0.2.0/sef/core/realtime/LatestRealtimeFrameStore.py +132 -0
- sef-0.2.0/sef/core/realtime/NullRealtimeFrameSink.py +19 -0
- sef-0.2.0/sef/core/realtime/RealtimeFrame.py +73 -0
- sef-0.2.0/sef/core/realtime/__init__.py +24 -0
- sef-0.2.0/sef/core/utils/OpenCVBarrierSelector.py +144 -0
- sef-0.2.0/sef/core/utils/OpenCVDisplayUtils.py +64 -0
- sef-0.2.0/sef/core/utils/OpenCVMaskSelector.py +206 -0
- sef-0.2.0/sef/core/utils/OpenCVMultiStartBoxSelector.py +96 -0
- sef-0.2.0/sef/core/utils/OpenCVStartBoxSelector.py +74 -0
- sef-0.2.0/sef/core/visualization/PipelineOutputs.py +52 -0
- sef-0.2.0/sef/core/visualization/PipelineRunMetadata.py +29 -0
- sef-0.2.0/sef/core/visualization/VisualArtifact.py +259 -0
- sef-0.2.0/sef/core/visualization/VisualizationContext.py +30 -0
- sef-0.2.0/sef/core/visualization/__init__.py +65 -0
- sef-0.2.0/sef.egg-info/PKG-INFO +52 -0
- sef-0.2.0/sef.egg-info/SOURCES.txt +280 -0
- sef-0.2.0/sef.egg-info/dependency_links.txt +1 -0
- sef-0.2.0/sef.egg-info/entry_points.txt +2 -0
- sef-0.2.0/sef.egg-info/requires.txt +51 -0
- sef-0.2.0/sef.egg-info/top_level.txt +1 -0
- sef-0.2.0/setup.cfg +4 -0
- sef-0.2.0/setup.py +22 -0
- sef-0.2.0/tests/test_aruco_pipeline.py +422 -0
- sef-0.2.0/tests/test_branching.py +995 -0
- sef-0.2.0/tests/test_builder_fix.py +270 -0
- sef-0.2.0/tests/test_cli.py +329 -0
- sef-0.2.0/tests/test_cli_output.py +22 -0
- sef-0.2.0/tests/test_coco_pose_realtime_pipeline.py +199 -0
- sef-0.2.0/tests/test_color_stabilization_frame_processor.py +117 -0
- sef-0.2.0/tests/test_config_versioning.py +132 -0
- sef-0.2.0/tests/test_documentation_examples.py +47 -0
- sef-0.2.0/tests/test_dynamic_object_removal_frame_processor.py +214 -0
- sef-0.2.0/tests/test_event_bus.py +204 -0
- sef-0.2.0/tests/test_intermediate_frames.py +316 -0
- sef-0.2.0/tests/test_opencv_frame_buffer_video_exporter.py +116 -0
- sef-0.2.0/tests/test_phase_magnification_frame_processor.py +152 -0
- sef-0.2.0/tests/test_pipeline_builder_config.py +49 -0
- sef-0.2.0/tests/test_pipeline_config_editor.py +55 -0
- sef-0.2.0/tests/test_pipeline_core.py +297 -0
- sef-0.2.0/tests/test_pipeline_export.py +302 -0
- sef-0.2.0/tests/test_plugin_registry.py +118 -0
- sef-0.2.0/tests/test_public_api_and_errors.py +119 -0
- sef-0.2.0/tests/test_realtime_visualization.py +155 -0
- sef-0.2.0/tests/test_sef_facade.py +227 -0
- sef-0.2.0/tests/test_streaming_pipeline.py +524 -0
sef-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
“Commons Clause” License Condition v1.0
|
|
2
|
+
|
|
3
|
+
The Software is provided to you by the Licensor under the License, as defined below, subject to the following condition.
|
|
4
|
+
|
|
5
|
+
Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, the right to Sell the Software.
|
|
6
|
+
|
|
7
|
+
For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Clause License Condition notice.
|
|
8
|
+
|
|
9
|
+
Software: SEF
|
|
10
|
+
|
|
11
|
+
License: Apache 2.0
|
|
12
|
+
|
|
13
|
+
Licensors: Alejandro Innocenzi, Matteo Vittori, Michele Loreti
|
sef-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sef
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Signal extraction framework for video and image sequences
|
|
5
|
+
Author: Matteo Vittori, Alejandro Innocenzi
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: numpy
|
|
9
|
+
Requires-Dist: PyYAML>=6.0
|
|
10
|
+
Provides-Extra: opencv
|
|
11
|
+
Requires-Dist: opencv-contrib-python; extra == "opencv"
|
|
12
|
+
Provides-Extra: visualization
|
|
13
|
+
Requires-Dist: matplotlib; extra == "visualization"
|
|
14
|
+
Provides-Extra: ui
|
|
15
|
+
Requires-Dist: matplotlib; extra == "ui"
|
|
16
|
+
Requires-Dist: opencv-contrib-python; extra == "ui"
|
|
17
|
+
Requires-Dist: Pillow>=10.0.0; extra == "ui"
|
|
18
|
+
Requires-Dist: streamlit; extra == "ui"
|
|
19
|
+
Requires-Dist: streamlit-drawable-canvas; extra == "ui"
|
|
20
|
+
Provides-Extra: yolo
|
|
21
|
+
Requires-Dist: opencv-contrib-python; extra == "yolo"
|
|
22
|
+
Requires-Dist: ultralytics; extra == "yolo"
|
|
23
|
+
Provides-Extra: pose
|
|
24
|
+
Requires-Dist: joblib; extra == "pose"
|
|
25
|
+
Requires-Dist: scikit-learn; extra == "pose"
|
|
26
|
+
Provides-Extra: all
|
|
27
|
+
Requires-Dist: joblib; extra == "all"
|
|
28
|
+
Requires-Dist: matplotlib; extra == "all"
|
|
29
|
+
Requires-Dist: opencv-contrib-python; extra == "all"
|
|
30
|
+
Requires-Dist: Pillow>=10.0.0; extra == "all"
|
|
31
|
+
Requires-Dist: scikit-learn; extra == "all"
|
|
32
|
+
Requires-Dist: streamlit; extra == "all"
|
|
33
|
+
Requires-Dist: streamlit-drawable-canvas; extra == "all"
|
|
34
|
+
Requires-Dist: ultralytics; extra == "all"
|
|
35
|
+
Provides-Extra: docs
|
|
36
|
+
Requires-Dist: mkdocs>=1.6; extra == "docs"
|
|
37
|
+
Requires-Dist: mkdocstrings[python]>=0.25; extra == "docs"
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: joblib; extra == "dev"
|
|
40
|
+
Requires-Dist: matplotlib; extra == "dev"
|
|
41
|
+
Requires-Dist: mkdocs>=1.6; extra == "dev"
|
|
42
|
+
Requires-Dist: mkdocstrings[python]>=0.25; extra == "dev"
|
|
43
|
+
Requires-Dist: opencv-contrib-python; extra == "dev"
|
|
44
|
+
Requires-Dist: Pillow>=10.0.0; extra == "dev"
|
|
45
|
+
Requires-Dist: pytest; extra == "dev"
|
|
46
|
+
Requires-Dist: ruff; extra == "dev"
|
|
47
|
+
Requires-Dist: scikit-learn; extra == "dev"
|
|
48
|
+
Requires-Dist: streamlit; extra == "dev"
|
|
49
|
+
Requires-Dist: streamlit-drawable-canvas; extra == "dev"
|
|
50
|
+
Requires-Dist: ultralytics; extra == "dev"
|
|
51
|
+
Dynamic: author
|
|
52
|
+
Dynamic: license-file
|
sef-0.2.0/README.md
ADDED
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
# SEF
|
|
2
|
+
|
|
3
|
+
[](pyproject.toml)
|
|
4
|
+

|
|
5
|
+
[](https://nonamedeo.github.io/SEF/)
|
|
6
|
+

|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
**SEF is an experimental Python framework for building modular computer-vision
|
|
10
|
+
signal-extraction pipelines through a small Pythonic API and an extensible
|
|
11
|
+
runtime core.**
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
It separates video acquisition, frame processing, signal extraction, cleaning,
|
|
17
|
+
analysis, visualization, runtime monitoring, and UI composition into explicit
|
|
18
|
+
contracts. The recommended API hides that machinery behind `import sef`, while
|
|
19
|
+
the lower-level core remains available for advanced registry, runtime, and
|
|
20
|
+
integration use cases.
|
|
21
|
+
|
|
22
|
+
The project is architecture-focused and currently pre-1.0: public APIs are
|
|
23
|
+
being hardened and may still evolve before a stable release.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Processing Example
|
|
27
|
+
|
|
28
|
+
The same sequence before and after the SEF processing pipeline.
|
|
29
|
+
|
|
30
|
+
| Pre-processed video | Processed video |
|
|
31
|
+
|---|---|
|
|
32
|
+
|  |  |
|
|
33
|
+
## Why SEF
|
|
34
|
+
|
|
35
|
+
SEF is designed for research, experimentation, and framework-oriented computer
|
|
36
|
+
vision workflows where the pipeline matters as much as the individual model.
|
|
37
|
+
|
|
38
|
+
Use it when you want to:
|
|
39
|
+
|
|
40
|
+
- compose video-analysis pipelines from small interchangeable stages;
|
|
41
|
+
- switch between programmatic and config-driven pipeline construction;
|
|
42
|
+
- run batch and streaming-compatible stages through a shared runtime;
|
|
43
|
+
- expose analyzer output as UI-agnostic visual artifacts;
|
|
44
|
+
- build custom plugins without editing the execution engine;
|
|
45
|
+
- inspect execution plans, runtime state, logs, outputs, and artifacts from a UI.
|
|
46
|
+
|
|
47
|
+
## Key Features
|
|
48
|
+
|
|
49
|
+
- **Modular pipeline architecture** for extractors, processors, cleaners,
|
|
50
|
+
analyzers, visualizers, exporters, and branching rules.
|
|
51
|
+
- **Streaming runtime** with bounded buffers and latency policies.
|
|
52
|
+
- **Runtime execution planner** that records batch/streaming decisions.
|
|
53
|
+
- **Plugin registry** with categories, aliases, descriptors, and config-driven
|
|
54
|
+
construction.
|
|
55
|
+
- **Visual artifacts** decoupled from UI frameworks.
|
|
56
|
+
- **Sync and async execution** through pipeline runners and monitors.
|
|
57
|
+
- **Event-driven branching** for secondary pipelines triggered by domain events.
|
|
58
|
+
- **SEF Studio** Streamlit UI for composing, running, and monitoring pipelines.
|
|
59
|
+
- **Versioned configuration** for evolving declarative pipeline schemas.
|
|
60
|
+
|
|
61
|
+
## Architecture Overview
|
|
62
|
+
|
|
63
|
+
SEF keeps the framework core independent from concrete OpenCV, YOLO, Matplotlib,
|
|
64
|
+
and Streamlit adapters. The core owns contracts, planning, runtime execution,
|
|
65
|
+
events, typed errors, buffers, artifacts, and plugin resolution.
|
|
66
|
+
|
|
67
|
+
```mermaid
|
|
68
|
+
flowchart LR
|
|
69
|
+
API["Pythonic API / Studio / Config"] --> Config["Versioned Pipeline Config"]
|
|
70
|
+
Config --> Registry["Plugin Registry"]
|
|
71
|
+
Registry --> Context["PipelineContext"]
|
|
72
|
+
Context --> Planner["Execution Planner"]
|
|
73
|
+
Planner --> Runtime["Pipeline Runtime"]
|
|
74
|
+
|
|
75
|
+
Runtime --> Frames["Frame Extraction"]
|
|
76
|
+
Frames --> Processing["Frame Processing"]
|
|
77
|
+
Processing --> Signals["Signal Extraction"]
|
|
78
|
+
Signals --> Cleaning["Signal Cleaning"]
|
|
79
|
+
Cleaning --> Analysis["Analysis"]
|
|
80
|
+
Analysis --> Visuals["Visual Artifacts"]
|
|
81
|
+
Runtime --> Events["Events / Branching"]
|
|
82
|
+
Visuals --> UI["SEF Studio / APIs / Notebooks"]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
<!-- PLACEHOLDER: Add high-level architecture image matching the Mermaid flow; purpose: provide a polished visual for readers who do not inspect diagrams; ideal placement: directly after the Architecture Overview paragraph. -->
|
|
86
|
+
|
|
87
|
+
<!-- PLACEHOLDER: Add execution/runtime flow diagram showing batch vs streaming decisions, buffers, and latency policy; purpose: clarify the adaptive runtime at a glance; ideal placement: after the Mermaid diagram. -->
|
|
88
|
+
|
|
89
|
+
The detailed architecture, public contracts, and extension rules live in the
|
|
90
|
+
[MkDocs documentation](https://nonamedeo.github.io/SEF/).
|
|
91
|
+
|
|
92
|
+
## Quick Example
|
|
93
|
+
|
|
94
|
+
The recommended API keeps the common path short: describe the source, choose the
|
|
95
|
+
stages, and run.
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
import sef
|
|
99
|
+
|
|
100
|
+
outputs = (
|
|
101
|
+
sef.video("videos/Baloons.mp4", max_frames=300)
|
|
102
|
+
.resize(640, 480)
|
|
103
|
+
.extract(
|
|
104
|
+
"opencv_tracker",
|
|
105
|
+
tracker_type="MIL",
|
|
106
|
+
start_box=[100, 200, 50, 80],
|
|
107
|
+
config={"show": False},
|
|
108
|
+
)
|
|
109
|
+
.clean("moving_average", window_size=5)
|
|
110
|
+
.analyze("vertical_position")
|
|
111
|
+
.visualize("matplotlib")
|
|
112
|
+
.run(pipeline_id="demo-run")
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
print(outputs.results)
|
|
116
|
+
print(outputs.final_artifacts)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The same facade accepts plugin names, component classes, component instances, or
|
|
120
|
+
plain Python functions. This keeps simple experiments lightweight without
|
|
121
|
+
removing the advanced extension model.
|
|
122
|
+
|
|
123
|
+
`.run()` on a pipeline builder is the direct single-run shortcut. Use
|
|
124
|
+
`sef.orchestrator().run(pipeline)` instead when execution needs lifecycle
|
|
125
|
+
callbacks, background submission with `submit()`, active-id tracking, or
|
|
126
|
+
event-driven branching.
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
import cv2
|
|
130
|
+
import sef
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
@sef.processor("grayscale")
|
|
134
|
+
def grayscale(image):
|
|
135
|
+
"""Convert one OpenCV frame image to grayscale."""
|
|
136
|
+
return cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
outputs = (
|
|
140
|
+
sef.video("videos/input.mp4")
|
|
141
|
+
.process("grayscale")
|
|
142
|
+
.extract("opencv_tracker", tracker_type="MIL", start_box=[100, 200, 50, 80])
|
|
143
|
+
.analyze("vertical_position")
|
|
144
|
+
.run()
|
|
145
|
+
)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
For custom classes, pass the class directly and SEF will register it in the
|
|
149
|
+
pipeline-scoped registry:
|
|
150
|
+
|
|
151
|
+
```python
|
|
152
|
+
import sef
|
|
153
|
+
|
|
154
|
+
outputs = (
|
|
155
|
+
sef.pipeline("quickstart")
|
|
156
|
+
.frames(DemoFrameExtractor, frame_count=3)
|
|
157
|
+
.signals(DemoSignalExtractor)
|
|
158
|
+
.analyze(SampleCountAnalyzer)
|
|
159
|
+
.visualize(SummaryVisualizer)
|
|
160
|
+
.run()
|
|
161
|
+
)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Advanced users can still drop down to the versioned configuration path and core
|
|
165
|
+
contracts when they need full control over registries, orchestration, or
|
|
166
|
+
runtime integration:
|
|
167
|
+
|
|
168
|
+
```python
|
|
169
|
+
from sef.builtin.registry import create_builtin_registry
|
|
170
|
+
from sef.core import ConfigPipelineBuilder, Pipeline
|
|
171
|
+
|
|
172
|
+
registry = create_builtin_registry()
|
|
173
|
+
|
|
174
|
+
config = {
|
|
175
|
+
"schema_version": "1.0",
|
|
176
|
+
"pipeline": {
|
|
177
|
+
"frame_extractor": {
|
|
178
|
+
"name": "opencv_buffered",
|
|
179
|
+
"params": {"path": "videos/Baloons.mp4"},
|
|
180
|
+
},
|
|
181
|
+
"signal_extractor": {
|
|
182
|
+
"name": "opencv_tracker",
|
|
183
|
+
"params": {"tracker_type": "MIL", "start_box": [100, 200, 50, 80]},
|
|
184
|
+
},
|
|
185
|
+
"signal_cleaners": [
|
|
186
|
+
{"name": "moving_average", "params": {"window_size": 5}},
|
|
187
|
+
],
|
|
188
|
+
"analyzers": [
|
|
189
|
+
{"name": "vertical_position"},
|
|
190
|
+
],
|
|
191
|
+
"visualizers": [
|
|
192
|
+
{"name": "matplotlib"},
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
context = ConfigPipelineBuilder(registry).build_context(config)
|
|
198
|
+
outputs = Pipeline(context, pipeline_id="demo-run").run()
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
For a minimal runnable example without OpenCV or UI dependencies, see
|
|
202
|
+
[`examples/minimal_pipeline.py`](examples/minimal_pipeline.py).
|
|
203
|
+
|
|
204
|
+
## Command Line
|
|
205
|
+
|
|
206
|
+
After installing SEF in editable mode, the `sef` command can scaffold projects,
|
|
207
|
+
validate configs, explain execution plans, run pipelines, and inspect registered
|
|
208
|
+
components:
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
pip install -e .
|
|
212
|
+
sef init tracking-demo
|
|
213
|
+
sef doctor --config pipeline.yaml
|
|
214
|
+
sef validate pipeline.yaml --strict
|
|
215
|
+
sef run pipeline.yaml --dry-run --explain
|
|
216
|
+
sef run pipeline.yaml --pipeline-id demo-run --output outputs/demo-run
|
|
217
|
+
sef components list
|
|
218
|
+
sef components list --category analyzer
|
|
219
|
+
sef components inspect vertical_position
|
|
220
|
+
sef config schema --format yaml
|
|
221
|
+
sef version
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Video/OpenCV configs such as `tracking-demo` require the OpenCV extra:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
pip install -e ".[opencv]"
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Local plugin modules placed in `plugins/*.py` are imported before `validate`,
|
|
231
|
+
`run`, and `components` commands, so decorator plugins such as
|
|
232
|
+
`@sef.analyzer("my_analyzer")` are immediately available to configs.
|
|
233
|
+
|
|
234
|
+
The same example can be run without installing console scripts:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
python -m examples.minimal_pipeline
|
|
238
|
+
python -m sef validate pipeline.yaml
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Orchestration
|
|
242
|
+
|
|
243
|
+
`sef.pipeline()` describes one pipeline. `sef.orchestrator()` coordinates
|
|
244
|
+
execution when an application needs lifecycle callbacks, background submission,
|
|
245
|
+
or event-driven branching:
|
|
246
|
+
|
|
247
|
+
```python
|
|
248
|
+
import sef
|
|
249
|
+
|
|
250
|
+
events = []
|
|
251
|
+
|
|
252
|
+
pipeline = (
|
|
253
|
+
sef.pipeline("tracked-run")
|
|
254
|
+
.frames(MyFrameExtractor)
|
|
255
|
+
.signals(MySignalExtractor)
|
|
256
|
+
.analyze(MyAnalyzer)
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
outputs = (
|
|
260
|
+
sef.orchestrator()
|
|
261
|
+
.on_lifecycle("after_run", events.append)
|
|
262
|
+
.run(pipeline)
|
|
263
|
+
)
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Branching and orchestration are intentionally not part of the YAML config
|
|
267
|
+
schema yet. A config file describes a single pipeline graph; application code
|
|
268
|
+
decides whether to run it directly, submit it in the background, observe
|
|
269
|
+
lifecycle events, or attach branching rules.
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
## Intermediate Artifacts
|
|
273
|
+
|
|
274
|
+
SEF can expose intermediate frame artifacts produced during the pipeline,
|
|
275
|
+
including pre-processed frames, cleaned frames, masks, overlays, and final debug
|
|
276
|
+
views.
|
|
277
|
+
|
|
278
|
+
This makes each run easier to inspect, compare, and reproduce: users can see not
|
|
279
|
+
only the final result, but also how each processing stage transformed the input.
|
|
280
|
+
|
|
281
|
+
| Original / Pre-processed | Noise / Motion Mask | Motion Mask | Final Output |
|
|
282
|
+
|---|---|---|---|
|
|
283
|
+
|  |  |  |  |
|
|
284
|
+
|
|
285
|
+
## Visual Results
|
|
286
|
+
|
|
287
|
+
SEF is built around visual inspection, replayable artifacts, and UI-friendly
|
|
288
|
+
outputs. The repository should eventually include real captures from the current
|
|
289
|
+
pipeline and SEF Studio workflows.
|
|
290
|
+
|
|
291
|
+
### Tracking Playback
|
|
292
|
+
| Pre-processed video | Processed video |
|
|
293
|
+
|---|---|
|
|
294
|
+
|  |  |
|
|
295
|
+
|
|
296
|
+
### Annotated Playback
|
|
297
|
+
|
|
298
|
+
<!-- PLACEHOLDER: Add annotated playback clip with bounding boxes, trajectories, and frame metadata; purpose: demonstrate visual artifact output quality; ideal placement: after Tracking Playback. -->
|
|
299
|
+
|
|
300
|
+
### Optical Flow
|
|
301
|
+
|
|
302
|
+
<!-- PLACEHOLDER: Add dense optical flow visualization from an actual SEF run; purpose: show motion-field analysis output; ideal placement: Optical Flow subsection. -->
|
|
303
|
+
|
|
304
|
+
### Signal Graphs
|
|
305
|
+
|
|
306
|
+
<!-- PLACEHOLDER: Add signal graph screenshot for vertical/horizontal position or velocity; purpose: show analyzer-to-visualizer data flow; ideal placement: Signal Graphs subsection. -->
|
|
307
|
+
|
|
308
|
+
### Barrier Counting
|
|
309
|
+
|
|
310
|
+
<!-- PLACEHOLDER: Add barrier counting screenshot or GIF with counted crossings; purpose: demonstrate geometric event analysis; ideal placement: Barrier Counting subsection. -->
|
|
311
|
+
|
|
312
|
+
### Pose Tracking
|
|
313
|
+
|
|
314
|
+
<!-- PLACEHOLDER: Add COCO/YOLO pose tracking GIF from a real pipeline run; purpose: show realtime or playback skeleton analysis; ideal placement: Pose Tracking subsection. -->
|
|
315
|
+
|
|
316
|
+
### Motion Analysis
|
|
317
|
+
|
|
318
|
+
<!-- PLACEHOLDER: Add motion-analysis comparison panel with source, processed frame, and output artifact; purpose: show intermediate artifacts and inspection workflow; ideal placement: Motion Analysis subsection. -->
|
|
319
|
+
|
|
320
|
+
## SEF Studio
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
`SEF Studio` is the Streamlit application built on top of the same pipeline
|
|
324
|
+
runtime. It is not a separate engine: visual composition, Python facade usage,
|
|
325
|
+
and versioned config all resolve to the same core execution model.
|
|
326
|
+
|
|
327
|
+

|
|
328
|
+
|
|
329
|
+
Current UI goals:
|
|
330
|
+
|
|
331
|
+
- compose pipeline stages visually;
|
|
332
|
+
- edit and submit config-driven runs;
|
|
333
|
+
- inspect execution plan and runtime status;
|
|
334
|
+
- monitor logs by level;
|
|
335
|
+
- preview realtime outputs when supported;
|
|
336
|
+
- browse generated artifacts and analyzer results.
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
pip install -e ".[ui]"
|
|
340
|
+
streamlit run ui/app.py
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
<!-- PLACEHOLDER: Add screenshot of SEF Studio pipeline composer canvas; purpose: show visual pipeline construction; ideal placement: start of SEF Studio section. -->
|
|
344
|
+
|
|
345
|
+
<!-- PLACEHOLDER: Add screenshot of Run & Monitor tab with live preview, status, logs, and plan view; purpose: show runtime observability; ideal placement: after the SEF Studio feature list. -->
|
|
346
|
+
|
|
347
|
+
<!-- PLACEHOLDER: Add screenshot of artifacts/results panel; purpose: show final outputs and visual artifacts; ideal placement: end of SEF Studio section. -->
|
|
348
|
+
|
|
349
|
+
## Documentation
|
|
350
|
+
|
|
351
|
+
The README is intentionally concise. Use the MkDocs documentation for technical
|
|
352
|
+
details, contracts, and extension guidance:
|
|
353
|
+
|
|
354
|
+
- [Overview](docs/overview.md)
|
|
355
|
+
- [Getting Started](docs/getting-started.md)
|
|
356
|
+
- [Public API](docs/public-api.md)
|
|
357
|
+
- [Configuration](docs/configuration.md)
|
|
358
|
+
- [Plugin Authoring](docs/plugin-authoring.md)
|
|
359
|
+
- [Streaming Runtime](docs/streaming-runtime.md)
|
|
360
|
+
- [Error Handling](docs/error-handling.md)
|
|
361
|
+
- [Versioning](docs/versioning.md)
|
|
362
|
+
- [Generated API](docs/reference/generated-api.md)
|
|
363
|
+
|
|
364
|
+
Build the docs locally:
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
pip install -e ".[docs]"
|
|
368
|
+
mkdocs serve
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
## Installation
|
|
372
|
+
|
|
373
|
+
SEF currently targets Python 3.11+.
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
pip install -e .
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
Install only the adapter stacks you need:
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
pip install -e ".[opencv]" # OpenCV sources, processors, ArUco, video artifacts
|
|
383
|
+
pip install -e ".[visualization]" # Matplotlib visualizers
|
|
384
|
+
pip install -e ".[ui]" # Streamlit Studio
|
|
385
|
+
pip install -e ".[yolo]" # Ultralytics pose extraction
|
|
386
|
+
pip install -e ".[pose]" # COCO pose analyzer model helpers
|
|
387
|
+
pip install -e ".[all]" # all runtime adapter extras
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
For the full local development environment:
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
pip install -e ".[dev]"
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
## Project Status
|
|
397
|
+
|
|
398
|
+
SEF is experimental and evolving.
|
|
399
|
+
|
|
400
|
+
- The project is pre-1.0.
|
|
401
|
+
- Public APIs are being documented and hardened.
|
|
402
|
+
- Configuration schemas are versioned, but compatibility policy is still
|
|
403
|
+
maturing.
|
|
404
|
+
- The current implementation is suitable for experimentation, research,
|
|
405
|
+
demos, and architecture exploration.
|
|
406
|
+
- It should not yet be presented as production-stable infrastructure.
|
|
407
|
+
|
|
408
|
+
No benchmark, adoption, or production-readiness claims are made here.
|
|
409
|
+
|
|
410
|
+
## Repository Map
|
|
411
|
+
|
|
412
|
+
```text
|
|
413
|
+
sef/ Recommended Pythonic public API
|
|
414
|
+
sef/core/ Public contracts, runtime, registry, artifacts, events
|
|
415
|
+
sef/builtin/* Concrete computer-vision components and visualizers
|
|
416
|
+
ui/ Streamlit application built on the core framework
|
|
417
|
+
docs/ MkDocs public documentation
|
|
418
|
+
examples/ Minimal runnable examples
|
|
419
|
+
tests/ Core, registry, builder, streaming, and UI service tests
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
## Core Authors
|
|
423
|
+
|
|
424
|
+
- Matteo Vittori
|
|
425
|
+
- Alejandro Innocenzi
|
|
426
|
+
|
|
427
|
+
## Acknowledgements
|
|
428
|
+
|
|
429
|
+
We would like to extend our special thanks to:
|
|
430
|
+
- Michele Loreti (for his guidance and advice throughout the project)
|
|
431
|
+
- Tomek Paczkowski (for kindly granting us ownership of the "sef" package name on PyPi)
|
sef-0.2.0/pyproject.toml
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=82", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sef"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "Signal extraction framework for video and image sequences"
|
|
9
|
+
requires-python = ">=3.11"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"numpy",
|
|
12
|
+
"PyYAML>=6.0",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[project.scripts]
|
|
16
|
+
sef = "sef.cli:main"
|
|
17
|
+
|
|
18
|
+
[project.optional-dependencies]
|
|
19
|
+
opencv = [
|
|
20
|
+
"opencv-contrib-python",
|
|
21
|
+
]
|
|
22
|
+
visualization = [
|
|
23
|
+
"matplotlib",
|
|
24
|
+
]
|
|
25
|
+
ui = [
|
|
26
|
+
"matplotlib",
|
|
27
|
+
"opencv-contrib-python",
|
|
28
|
+
"Pillow>=10.0.0",
|
|
29
|
+
"streamlit",
|
|
30
|
+
"streamlit-drawable-canvas",
|
|
31
|
+
]
|
|
32
|
+
yolo = [
|
|
33
|
+
"opencv-contrib-python",
|
|
34
|
+
"ultralytics",
|
|
35
|
+
]
|
|
36
|
+
pose = [
|
|
37
|
+
"joblib",
|
|
38
|
+
"scikit-learn",
|
|
39
|
+
]
|
|
40
|
+
all = [
|
|
41
|
+
"joblib",
|
|
42
|
+
"matplotlib",
|
|
43
|
+
"opencv-contrib-python",
|
|
44
|
+
"Pillow>=10.0.0",
|
|
45
|
+
"scikit-learn",
|
|
46
|
+
"streamlit",
|
|
47
|
+
"streamlit-drawable-canvas",
|
|
48
|
+
"ultralytics",
|
|
49
|
+
]
|
|
50
|
+
docs = [
|
|
51
|
+
"mkdocs>=1.6",
|
|
52
|
+
"mkdocstrings[python]>=0.25",
|
|
53
|
+
]
|
|
54
|
+
dev = [
|
|
55
|
+
"joblib",
|
|
56
|
+
"matplotlib",
|
|
57
|
+
"mkdocs>=1.6",
|
|
58
|
+
"mkdocstrings[python]>=0.25",
|
|
59
|
+
"opencv-contrib-python",
|
|
60
|
+
"Pillow>=10.0.0",
|
|
61
|
+
"pytest",
|
|
62
|
+
"ruff",
|
|
63
|
+
"scikit-learn",
|
|
64
|
+
"streamlit",
|
|
65
|
+
"streamlit-drawable-canvas",
|
|
66
|
+
"ultralytics",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[tool.setuptools.packages.find]
|
|
70
|
+
include = ["sef*"]
|
|
71
|
+
|
|
72
|
+
[tool.ruff]
|
|
73
|
+
line-length = 148
|
|
74
|
+
target-version = "py311"
|
|
75
|
+
|
|
76
|
+
[tool.ruff.lint]
|
|
77
|
+
select = ["E", "F", "I", "B"]
|
|
78
|
+
ignore = []
|
|
79
|
+
|
|
80
|
+
[tool.ruff.format]
|
|
81
|
+
quote-style = "double"
|
|
82
|
+
indent-style = "space"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""Public Pythonic entrypoint for SEF.
|
|
2
|
+
|
|
3
|
+
Use this module for concise workflows:
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
import sef
|
|
7
|
+
|
|
8
|
+
outputs = (
|
|
9
|
+
sef.pipeline("quickstart")
|
|
10
|
+
.frames("demo_frames", frame_count=3)
|
|
11
|
+
.signals("demo_signals")
|
|
12
|
+
.analyze("sample_count")
|
|
13
|
+
.visualize("summary_text")
|
|
14
|
+
.run()
|
|
15
|
+
)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Advanced users can still import stable lower-level contracts from
|
|
19
|
+
``sef.core`` or ``sef.core``.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from sef.api import (
|
|
23
|
+
OrchestratorFacade,
|
|
24
|
+
PipelineFacade,
|
|
25
|
+
analyzer,
|
|
26
|
+
cleaner,
|
|
27
|
+
default_registry,
|
|
28
|
+
frame_extractor,
|
|
29
|
+
from_config,
|
|
30
|
+
load_config,
|
|
31
|
+
normalize_config,
|
|
32
|
+
orchestrator,
|
|
33
|
+
pipeline,
|
|
34
|
+
processor,
|
|
35
|
+
register_user_plugin,
|
|
36
|
+
signal_extractor,
|
|
37
|
+
video,
|
|
38
|
+
visualizer,
|
|
39
|
+
webcam,
|
|
40
|
+
)
|
|
41
|
+
from sef.core import PipelineExecutionError
|
|
42
|
+
|
|
43
|
+
__all__ = [
|
|
44
|
+
"OrchestratorFacade",
|
|
45
|
+
"PipelineFacade",
|
|
46
|
+
"PipelineExecutionError",
|
|
47
|
+
"analyzer",
|
|
48
|
+
"cleaner",
|
|
49
|
+
"default_registry",
|
|
50
|
+
"frame_extractor",
|
|
51
|
+
"from_config",
|
|
52
|
+
"load_config",
|
|
53
|
+
"normalize_config",
|
|
54
|
+
"orchestrator",
|
|
55
|
+
"pipeline",
|
|
56
|
+
"processor",
|
|
57
|
+
"register_user_plugin",
|
|
58
|
+
"signal_extractor",
|
|
59
|
+
"video",
|
|
60
|
+
"visualizer",
|
|
61
|
+
"webcam",
|
|
62
|
+
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""High-level Pythonic SEF API."""
|
|
2
|
+
|
|
3
|
+
from sef.api.config import load_config, normalize_config
|
|
4
|
+
from sef.api.decorators import analyzer, cleaner, frame_extractor, processor, signal_extractor, visualizer
|
|
5
|
+
from sef.api.orchestrator import OrchestratorFacade, orchestrator
|
|
6
|
+
from sef.api.pipeline import PipelineFacade, from_config, pipeline, video, webcam
|
|
7
|
+
from sef.api.registry import default_registry, register_user_plugin
|
|
8
|
+
|
|
9
|
+
__all__ = [
|
|
10
|
+
"OrchestratorFacade",
|
|
11
|
+
"PipelineFacade",
|
|
12
|
+
"analyzer",
|
|
13
|
+
"cleaner",
|
|
14
|
+
"default_registry",
|
|
15
|
+
"frame_extractor",
|
|
16
|
+
"from_config",
|
|
17
|
+
"load_config",
|
|
18
|
+
"normalize_config",
|
|
19
|
+
"orchestrator",
|
|
20
|
+
"pipeline",
|
|
21
|
+
"processor",
|
|
22
|
+
"register_user_plugin",
|
|
23
|
+
"signal_extractor",
|
|
24
|
+
"video",
|
|
25
|
+
"visualizer",
|
|
26
|
+
"webcam",
|
|
27
|
+
]
|