Skip to content
Open
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
22 changes: 22 additions & 0 deletions docs/docs/Feed-Forward-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,25 @@ a 1-to-1 correspondence with a MOG motion track.
Refer to `runMogThenOcvFaceFeedForwardRegionTest()` in the
[`TestSystemOnDiff`](https://github.com/openmpf/openmpf/blob/master/trunk/mpf-system-tests/src/test/java/org/mitre/mpf/mst/TestSystemOnDiff.java)
class for a system test that demonstrates this behavior.


# Feed Forward All Tracks

<div style="background-color:DeepSkyBlue"><p style="color:white; padding:5px"><b>EXPERIMENTAL:</b> This feature is not fully implemented.</p></div>

The default feed-forward behavior will result in generating one sub-job per track generated in the previous stage.
Consider a scenario where you need to implement a tracking component that takes individual detections from a stage and
groups them into tracks. That component needs to accept all tracks from the previous stage as an input to the same
sub-job.

Setting `FEED_FORWARD_ALL_TRACKS` to true will result in generating one sub-job that contains all the tracks generated
in the previous stage. Refer to the
[component.get_detections_from_all_video_tracks(video_job)](Python-Batch-Component-API.md#componentget_detections_from_all_video_tracksvideo_job)
section of the Python Batch Component API for more details. This property works in conjunction with the other
feed-forward properties discussed in the [Feed Forward Properties](#feed-forward-properties) section.

Known limitations:

- Only Python supported.
- Only video supported.
- Not tested with [triggers](Trigger-Guide.md).
63 changes: 61 additions & 2 deletions docs/docs/Python-Batch-Component-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ a static method, or a class method.


#### mpf_component_api.VideoJob
Class containing data used for detection of objects in a video file.
Class containing data used for detection of objects in a video file. Contains at most one feed-forward track.

* Members:

Expand Down Expand Up @@ -713,7 +713,7 @@ Class containing data used for detection of objects in a video file.
<tr>
<td>feed_forward_track</td>
<td><code>None</code> or <code>mpf_component_api.VideoTrack</code></td>
<td>An <code>mpf_component_api.VideoTrack</code> from the previous pipeline stage. Provided when feed forward is enabled. See <a href="../Feed-Forward-Guide/index.html">Feed Forward Guide</a>.</td>
<td>An optional <code>mpf_component_api.VideoTrack</code> from the previous pipeline stage. Provided when feed forward is enabled. See <a href="../Feed-Forward-Guide/index.html">Feed Forward Guide</a>.</td>
</tr>
</tbody>
</table>
Expand All @@ -733,6 +733,65 @@ they should only be used to specify properties that will not change throughout t
of the service (e.g. Docker container).


#### component.get_detections_from_all_video_tracks(video_job)

<div style="background-color:DeepSkyBlue"><p style="color:white; padding:5px"><b>EXPERIMENTAL:</b> This feature is not fully implemented.</p></div>

Similar to `component.get_detections_from_video(video_job)`, but able to process multiple feed-forward tracks at once.
Refer to the [Feed Forward All Tracks](Feed-Forward-Guide.md#feed-forward-all-tracks) section of the Feed Forward Guide
to learn about the `FEED_FORWARD_ALL_TRACKS` property and how it affects feed-forward behavior.

Known limitation: No multi-track `mpf_component_util.VideoCapture` support.

* Method Definition:
```python
class MyComponent:
def get_detections_from_all_video_tracks(self, video_job):
return [mpf_component_api.VideoTrack(...), ...]
```

`get_detections_from_all_video_tracks`, like all get_detections_from_\* methods, can be implemented either as an
instance method, a static method, or a class method.

* Parameters:

| Parameter | Data Type | Description |
|-----------|---------------------------------------|-------------|
| video_job | `mpf_component_api.AllVideoTracksJob` | Object containing details about the work to be performed.

* Returns: An iterable of `mpf_component_api.VideoTrack`


#### mpf_component_api.AllVideoTracksJob

<div style="background-color:DeepSkyBlue"><p style="color:white; padding:5px"><b>EXPERIMENTAL:</b> This feature is not fully implemented.</p></div>

Class containing data used for detection of objects in a video file. May contain multiple feed-forward tracks.

Members are the same as `mpf_component_api.VideoJob` with the exception that `feed_forward_track` is replaced by
`feed_forward_tracks`.

* Members:

<table>
<thead>
<tr>
<th>Member</th>
<th>Data Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>feed_forward_tracks</td>
<td><code>None</code> or <code>List[mpf_component_api.VideoTrack]</code></td>
<td>An optional list of <code>mpf_component_api.VideoTrack</code> objects from the previous pipeline stage. Provided when feed forward is enabled and <code>FEED_FORWARD_ALL_TRACKS</code> is true. See <a href="../Feed-Forward-Guide/index.html#feed-forward-all-tracks">Feed Forward Guide</a>.</td>
</tr>
</tbody>
</table>



#### mpf_component_api.VideoTrack
Class used to store the location of detected objects in a video file.

Expand Down
21 changes: 21 additions & 0 deletions docs/site/Feed-Forward-Guide/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@
<li class="toctree-l3"><a href="#feed-forward-pipeline-examples">Feed Forward Pipeline Examples</a></li>


<li class="toctree-l3"><a href="#feed-forward-all-tracks">Feed Forward All Tracks</a></li>


</ul>
</li>
<li class="">
Expand Down Expand Up @@ -523,6 +526,24 @@ <h1 id="feed-forward-pipeline-examples">Feed Forward Pipeline Examples</h1>
<p>Refer to <code>runMogThenOcvFaceFeedForwardRegionTest()</code> in the
<a href="https://github.com/openmpf/openmpf/blob/master/trunk/mpf-system-tests/src/test/java/org/mitre/mpf/mst/TestSystemOnDiff.java"><code>TestSystemOnDiff</code></a>
class for a system test that demonstrates this behavior.</p>
<h1 id="feed-forward-all-tracks">Feed Forward All Tracks</h1>
<div style="background-color:DeepSkyBlue"><p style="color:white; padding:5px"><b>EXPERIMENTAL:</b> This feature is not fully implemented.</p></div>

<p>The default feed-forward behavior will result in generating one sub-job per track generated in the previous stage.
Consider a scenario where you need to implement a tracking component that takes individual detections from a stage and
groups them into tracks. That component needs to accept all tracks from the previous stage as an input to the same
sub-job.</p>
<p>Setting <code>FEED_FORWARD_ALL_TRACKS</code> to true will result in generating one sub-job that contains all the tracks generated
in the previous stage. Refer to the
<a href="../Python-Batch-Component-API/index.html#componentget_detections_from_all_video_tracksvideo_job">component.get_detections_from_all_video_tracks(video_job)</a>
section of the Python Batch Component API for more details. This property works in conjunction with the other
feed-forward properties discussed in the <a href="#feed-forward-properties">Feed Forward Properties</a> section.</p>
<p>Known limitations:</p>
<ul>
<li>Only Python supported.</li>
<li>Only video supported.</li>
<li>Not tested with <a href="../Trigger-Guide/index.html">triggers</a>.</li>
</ul>

</div>
</div>
Expand Down
68 changes: 66 additions & 2 deletions docs/site/Python-Batch-Component-API/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ <h4 id="componentget_detections_from_videovideo_job">component.get_detections_fr
<li>Returns: An iterable of <code>mpf_component_api.VideoTrack</code></li>
</ul>
<h4 id="mpf_component_apivideojob">mpf_component_api.VideoJob</h4>
<p>Class containing data used for detection of objects in a video file.</p>
<p>Class containing data used for detection of objects in a video file. Contains at most one feed-forward track.</p>
<ul>
<li>Members:</li>
</ul>
Expand Down Expand Up @@ -948,7 +948,7 @@ <h4 id="mpf_component_apivideojob">mpf_component_api.VideoJob</h4>
<tr>
<td>feed_forward_track</td>
<td><code>None</code> or <code>mpf_component_api.VideoTrack</code></td>
<td>An <code>mpf_component_api.VideoTrack</code> from the previous pipeline stage. Provided when feed forward is enabled. See <a href="../Feed-Forward-Guide/index.html">Feed Forward Guide</a>.</td>
<td>An optional <code>mpf_component_api.VideoTrack</code> from the previous pipeline stage. Provided when feed forward is enabled. See <a href="../Feed-Forward-Guide/index.html">Feed Forward Guide</a>.</td>
</tr>
</tbody>
</table>
Expand All @@ -967,6 +967,70 @@ <h4 id="mpf_component_apivideojob">mpf_component_api.VideoJob</h4>
possible to change the value of properties set via environment variables at runtime and therefore
they should only be used to specify properties that will not change throughout the entire lifetime
of the service (e.g. Docker container).</p>
<h4 id="componentget_detections_from_all_video_tracksvideo_job">component.get_detections_from_all_video_tracks(video_job)</h4>
<div style="background-color:DeepSkyBlue"><p style="color:white; padding:5px"><b>EXPERIMENTAL:</b> This feature is not fully implemented.</p></div>

<p>Similar to <code>component.get_detections_from_video(video_job)</code>, but able to process multiple feed-forward tracks at once.
Refer to the <a href="../Feed-Forward-Guide/index.html#feed-forward-all-tracks">Feed Forward All Tracks</a> section of the Feed Forward Guide
to learn about the <code>FEED_FORWARD_ALL_TRACKS</code> property and how it affects feed-forward behavior.</p>
<p>Known limitation: No multi-track <code>mpf_component_util.VideoCapture</code> support.</p>
<ul>
<li>Method Definition:</li>
</ul>
<pre><code class="language-python">class MyComponent:
def get_detections_from_all_video_tracks(self, video_job):
return [mpf_component_api.VideoTrack(...), ...]
</code></pre>
<p><code>get_detections_from_all_video_tracks</code>, like all get_detections_from_* methods, can be implemented either as an
instance method, a static method, or a class method.</p>
<ul>
<li>Parameters:</li>
</ul>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Data Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>video_job</td>
<td><code>mpf_component_api.AllVideoTracksJob</code></td>
<td>Object containing details about the work to be performed.</td>
</tr>
</tbody>
</table>
<ul>
<li>Returns: An iterable of <code>mpf_component_api.VideoTrack</code></li>
</ul>
<h4 id="mpf_component_apiallvideotracksjob">mpf_component_api.AllVideoTracksJob</h4>
<div style="background-color:DeepSkyBlue"><p style="color:white; padding:5px"><b>EXPERIMENTAL:</b> This feature is not fully implemented.</p></div>

<p>Class containing data used for detection of objects in a video file. May contain multiple feed-forward tracks.</p>
<p>Members are the same as <code>mpf_component_api.VideoJob</code> with the exception that <code>feed_forward_track</code> is replaced by
<code>feed_forward_tracks</code>.</p>
<ul>
<li>Members:</li>
</ul>
<table>
<thead>
<tr>
<th>Member</th>
<th>Data Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>feed_forward_tracks</td>
<td><code>None</code> or <code>List[mpf_component_api.VideoTrack]</code></td>
<td>An optional list of <code>mpf_component_api.VideoTrack</code> objects from the previous pipeline stage. Provided when feed forward is enabled and <code>FEED_FORWARD_ALL_TRACKS</code> is true. See <a href="../Feed-Forward-Guide/index.html#feed-forward-all-tracks">Feed Forward Guide</a>.</td>
</tr>
</tbody>
</table>

<h4 id="mpf_component_apivideotrack">mpf_component_api.VideoTrack</h4>
<p>Class used to store the location of detected objects in a video file.</p>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -408,5 +408,5 @@ <h1 id="overview">Overview</h1>

<!--
MkDocs version : 0.17.5
Build Date UTC : 2025-09-10 17:55:24
Build Date UTC : 2025-09-19 21:32:58
-->
21 changes: 18 additions & 3 deletions docs/site/search/search_index.json

Large diffs are not rendered by default.

Loading