-
Notifications
You must be signed in to change notification settings - Fork 668
Introduce OutputDoc #1828
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
Introduce OutputDoc #1828
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,8 +21,17 @@ DALI_SCHEMA(COCOReader) | |
| .NumInput(0) | ||
| .NumOutput(3) | ||
| .DocStr(R"code(Read data from a COCO dataset composed of directory with images | ||
| and an annotation files. For each image, with `m` bboxes, returns its bboxes as `(m,4)` | ||
| Tensor (``m * [x, y, w, h]`` or ``m * [left, top, right, bottom]``) and labels as `(m,1)` Tensor (``m * category_id``).)code") | ||
| and an annotation files. For each image ``i``, with ``m_i`` bboxes, returns its bboxes as | ||
| ``{m_i ,4}`` Tensor (``m_i * [x, y, w, h]`` or ``m_i * [left, top, right, bottom]``) | ||
| and labels as ``{m_i, 1}`` Tensor (``m * category_id``).)code") | ||
| .OutputDocStr(R"code(images : 1D TensorList of uint8 | ||
| Encoded image data.s. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is |
||
| bboxes : 2D TensorList of float | ||
| Adjusted bounding boxes. Each sample ``i`` has shape ``{m_i, 4}`` representing ``m_i`` bounding | ||
| boxes that are valid for given crop window. | ||
| labels : 2D TensorList of int, optional | ||
| Labels corresponding to bounding boxes. Each sample ``i`` has shape ``{m_i, 1}`` representing | ||
| ``m_i`` labels.)code") | ||
| .AddOptionalArg( | ||
| "meta_files_path", | ||
| "Path to directory with meta files containing preprocessed COCO annotations.", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,28 +25,29 @@ As an optional input, operator accepts external hints for OF calculation. | |
| The output format of this operator matches the output format of OF driver API. | ||
| Dali uses Turing optical flow hardware implementation: https://developer.nvidia.com/opticalflow-sdk | ||
| )code") | ||
| .NumInput(1, 2) | ||
| .NumOutput(1) | ||
| .AddOptionalArg(detail::kPresetArgName, R"code(Setting quality level of OF calculation. | ||
| .NumInput(1, 2) | ||
| .InputDoc(0, "frame_seq", "TensorList of uint8", "Batch of input sequences to calculate OF") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd write "optical flow" instead of OF
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the rest of the doc already use OF extensively.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok then, but I don't like using "OF" as if it was a well-established acronym |
||
| .InputDoc(1, "hints", "TensorList of float", "Batch of external hints for OF") | ||
| .NumOutput(1) | ||
| .AddOptionalArg(detail::kPresetArgName, R"code(Setting quality level of OF calculation. | ||
| 0.0f ... 1.0f, where 1.0f is best quality, lowest speed)code", .0f, false) | ||
| .AddOptionalArg(detail::kOutputFormatArgName, | ||
| R"code(Setting grid size for output vector. | ||
| .AddOptionalArg(detail::kOutputFormatArgName, | ||
| R"code(Setting grid size for output vector. | ||
| Value defines width of grid square (e.g. if value == 4, 4x4 grid is used). | ||
| For values <=0, grid size is undefined. Currently only grid_size=4 is supported.)code", -1, false) | ||
| .AddOptionalArg(detail::kEnableTemporalHintsArgName, | ||
| R"code(enabling/disabling temporal hints for sequences longer than 2 images. | ||
| .AddOptionalArg(detail::kEnableTemporalHintsArgName, | ||
| R"code(enabling/disabling temporal hints for sequences longer than 2 images. | ||
| They are used to speed up calculation: previous OF result in sequence is used to calculate current flow. You might | ||
| want to use temporal hints for sequences, that don't have much changes in the scene (e.g. only moving objects))code", | ||
| false, false) | ||
| .AddOptionalArg(detail::kEnableExternalHintsArgName, | ||
| R"code(enabling/disabling external hints for OF calculation. External hints | ||
| .AddOptionalArg(detail::kEnableExternalHintsArgName, | ||
| R"code(enabling/disabling external hints for OF calculation. External hints | ||
| are analogous to temporal hints, only they come from external source. When this option is enabled, | ||
| Operator requires 2 inputs.)code", | ||
| false, false) | ||
| .AddOptionalArg(detail::kImageTypeArgName, | ||
| R"code(Type of input images (RGB, BGR, GRAY))code", DALI_RGB, | ||
| false) | ||
| .AllowSequences(); | ||
| Operator requires 2 inputs.)code", false, false) | ||
| .AddOptionalArg(detail::kImageTypeArgName, | ||
| R"code(Type of input images (RGB, BGR, GRAY))code", DALI_RGB, | ||
| false) | ||
| .AllowSequences(); | ||
|
|
||
|
|
||
| DALI_REGISTER_OPERATOR(OpticalFlow, OpticalFlow<GPUBackend>, GPU); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I remember the conclusion was to start using
TensorListfor describing outputs. Wasn't it?