Skip to content

docs: add operator documentation#930

Draft
cmgzn wants to merge 3 commits intodatajuicer:mainfrom
cmgzn:update/test
Draft

docs: add operator documentation#930
cmgzn wants to merge 3 commits intodatajuicer:mainfrom
cmgzn:update/test

Conversation

@cmgzn
Copy link
Collaborator

@cmgzn cmgzn commented Mar 5, 2026

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the operator documentation by adding new examples, clarifying existing ones, and introducing documentation for newly added video processing operators. The changes aim to provide clearer guidance and better understanding for users of the system's various data processing capabilities.

Highlights

  • New Operator Documentation: Added comprehensive documentation for two new video-related mappers: video_camera_pose_mapper and video_hand_reconstruction_hawor_mapper.
  • Enhanced Effect Demonstrations: Introduced new and updated effect demonstration examples for several existing operators, including MetaTagsAggregator, CharacterRepetitionFilter, TokenNumFilter, VideoDurationFilter, NaiveReverseGrouper, AudioFFmpegWrappedMapper, DialogIntentDetectionMapper, DialogSentimentDetectionMapper, DialogTopicDetectionMapper, DownloadFileMapper, ImageDetectionYoloMapper, ImageFaceBlurMapper, ImageRemoveBackgroundMapper, ImageSegmentMapper, ImageTaggingVLMMapper, OptimizePromptMapper, OptimizeQAMapper, QueryIntentDetectionMapper, QuerySentimentDetectionMapper, QueryTopicDetectionMapper, RelationIdentityMapper, and VggtMapper.
  • Documentation Refinements: Cleaned up formatting by removing extra blank lines in several formatter documentation files and corrected a Chinese translation in image_sam_3d_body_mapper.md.
  • Parameter Configuration Updates: Updated parameter configurations and default values for AudioFFmpegWrappedMapper, VggtMapper, and TextTaggingByPromptMapper to reflect current usage and improve clarity.
  • Unit Test Link Corrections: Corrected and updated unit test links for RayBtsMinhashCppDeduplicator, S3DownloadFileMapper, and S3UploadFileMapper.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • docs/operators/aggregator/meta_tags_aggregator.md
    • Added effect demonstration for MetaTagsAggregator.
  • docs/operators/deduplicator/ray_bts_minhash_cpp_deduplicator.md
    • Updated unit test link.
  • docs/operators/filter/character_repetition_filter.md
    • Added effect demonstration for CharacterRepetitionFilter.
  • docs/operators/filter/image_pair_similarity_filter.md
    • Added __dj__stats__ meta-data to input data for ImagePairSimilarityFilter.
  • docs/operators/filter/token_num_filter.md
    • Added new test cases (test_token_num_filter) and updated output data format.
  • docs/operators/filter/video_duration_filter.md
    • Added new test cases (test_any, test_all, test_default_filter, test_filter_long_videos).
    • Updated input/output data to include __dj__stats__ and {PROJECT_ROOT}.
    • Renamed test_filter_videos_within_range to test_any.
  • docs/operators/formatter/csv_formatter.md
    • Removed extra blank lines.
  • docs/operators/formatter/empty_formatter.md
    • Removed extra blank lines.
  • docs/operators/formatter/json_formatter.md
    • Removed extra blank lines.
  • docs/operators/formatter/parquet_formatter.md
    • Removed extra blank lines.
  • docs/operators/formatter/ray_empty_formatter.md
    • Removed extra blank lines.
  • docs/operators/formatter/text_formatter.md
    • Removed extra blank lines.
  • docs/operators/formatter/tsv_formatter.md
    • Removed extra blank lines.
  • docs/operators/grouper/key_value_grouper.md
    • Modified KeyValueGrouper example to use default constructor.
  • docs/operators/grouper/naive_reverse_grouper.md
    • Added new test cases (test_two_batch_sample, test_rm_unbatched_keys1, test_rm_unbatched_keys2) for NaiveReverseGrouper.
  • docs/operators/mapper/audio_ffmpeg_wrapped_mapper.md
    • Removed atrim argument from AudioFFmpegWrappedMapper example.
    • Updated input/output paths with {PROJECT_ROOT}.
  • docs/operators/mapper/dialog_intent_detection_mapper.md
    • Added new test cases (test_max_round, test_max_round_zero, test_query, test_intent_candidates, test_rename_keys) for DialogIntentDetectionMapper.
    • Updated input data format.
  • docs/operators/mapper/dialog_sentiment_detection_mapper.md
    • Added new test cases (test_max_round, test_max_round_zero, test_query, test_sentiment_candidates, test_rename_keys) for DialogSentimentDetectionMapper.
    • Updated input data format.
  • docs/operators/mapper/dialog_topic_detection_mapper.md
    • Added new test cases (test_max_round, test_max_round_zero, test_query, test_topic_candidates, test_rename_keys) for DialogTopicDetectionMapper.
    • Updated input data format.
  • docs/operators/mapper/download_file_mapper.md
    • Added new test cases (test_image_with_savefield_and_resume, test_image_with_savefield_and_resume_and_savedir) for DownloadFileMapper.
    • Updated input/output paths with {PROJECT_ROOT}.
  • docs/operators/mapper/image_detection_yolo_mapper.md
    • Added new test cases (test_cpu, test_multi_process) for ImageDetectionYoloMapper.
  • docs/operators/mapper/image_face_blur_mapper.md
    • Added new test cases (test_box, test_box_radius) for ImageFaceBlurMapper.
  • docs/operators/mapper/image_remove_background_mapper.md
    • Added new test cases (test_multiple_images, test_single_image) for ImageRemoveBackgroundMapper.
  • docs/operators/mapper/image_sam_3d_body_mapper.md
    • Corrected Chinese translation for SAM 3D Body description.
  • docs/operators/mapper/image_segment_mapper.md
    • Added new test cases (test_cpu, test_multi_process) for ImageSegmentMapper.
  • docs/operators/mapper/image_tagging_vlm_mapper.md
    • Added new test case (test_api_model) for ImageTaggingVLMMapper.
  • docs/operators/mapper/optimize_prompt_mapper.md
    • Added new test case (test_api_model) for OptimizePromptMapper.
  • docs/operators/mapper/optimize_qa_mapper.md
    • Added new test case (test_api) for OptimizeQAMapper.
  • docs/operators/mapper/query_intent_detection_mapper.md
    • Added new test cases (test_default, test_no_zh_to_en) for QueryIntentDetectionMapper.
  • docs/operators/mapper/query_sentiment_detection_mapper.md
    • Added new test cases (test_default, test_no_zh_to_en) for QuerySentimentDetectionMapper.
  • docs/operators/mapper/query_topic_detection_mapper.md
    • Added new test cases (test_default, test_no_zh_to_en) for QueryTopicDetectionMapper.
  • docs/operators/mapper/relation_identity_mapper.md
    • Added new test cases (test_default, test_rename_key) for RelationIdentityMapper.
  • docs/operators/mapper/s3_download_file_mapper.md
    • Updated unit test link.
  • docs/operators/mapper/s3_upload_file_mapper.md
    • Updated unit test link.
  • docs/operators/mapper/text_tagging_by_prompt_mapper.md
    • Added model_params to parameter configuration.
  • docs/operators/mapper/vggt_mapper.md
    • Updated frame_dir default value and input paths with {PROJECT_ROOT}.
  • docs/operators/mapper/video_camera_pose_mapper.md
    • Added new documentation for video_camera_pose_mapper.
  • docs/operators/mapper/video_ffmpeg_wrapped_mapper.md
    • Removed scale argument from VideoFFmpegWrappedMapper example.
    • Updated input/output paths with {PROJECT_ROOT}.
  • docs/operators/mapper/video_hand_reconstruction_hawor_mapper.md
    • Added new documentation for video_hand_reconstruction_hawor_mapper.
  • docs/operators/mapper/video_object_segmenting_mapper.md
    • Updated input paths with {PROJECT_ROOT}.
Activity
  • The pull request was created by cmgzn.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds extensive documentation and examples for numerous operators across different modules. The changes include adding new "Effect demonstration" sections, updating links, and minor formatting fixes. While the additions are valuable, there are several areas where the documentation could be clearer and more consistent. Specifically, some examples have misleading outputs (e.g., showing [] for an empty dataset, or "empty" for a sample with rich metadata), some have code snippets that don't match the described behavior, and others have unreadable data representations or are missing output descriptions entirely. Addressing these issues will significantly improve the quality and usability of the documentation.

Note: Security Review has been skipped due to the limited scope of the PR.

<div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 1:</strong> text</div><pre style="padding:6px; background:#f6f8fa; border-radius:4px; overflow-x:auto; white-space:pre; word-wrap:normal;">Today is Sund Sund Sund Sund Sund Sunda and it&#x27;s a happy day!</pre><div class='meta' style='margin:6px 0;'><table class='meta-table' style='border-collapse:collapse; width:100%; border:1px solid #e3e3e3;'><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>__dj__stats__</th></tr><tr><td style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; font-weight:500; color:#444; border-bottom:1px solid #e3e3e3; white-space:nowrap;'>char_rep_ratio</td><td style='text-align:left; vertical-align:top; padding:4px 6px; padding-left:4px; border-bottom:1px solid #e3e3e3;'>0.5</td></tr></table></div></div><div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 2:</strong> text</div><pre style="padding:6px; background:#f6f8fa; border-radius:4px; overflow-x:auto; white-space:pre; word-wrap:normal;">a v s e c s f e f g a a a a a a a a a a</pre><div class='meta' style='margin:6px 0;'><table class='meta-table' style='border-collapse:collapse; width:100%; border:1px solid #e3e3e3;'><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>__dj__stats__</th></tr><tr><td style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; font-weight:500; color:#444; border-bottom:1px solid #e3e3e3; white-space:nowrap;'>char_rep_ratio</td><td style='text-align:left; vertical-align:top; padding:4px 6px; padding-left:4px; border-bottom:1px solid #e3e3e3;'>0.5</td></tr></table></div></div>

#### 📤 output data 输出数据
<div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 1:</strong> text</div><pre style="padding:6px; background:#f6f8fa; border-radius:4px; overflow-x:auto; white-space:pre; word-wrap:normal;">[]</pre></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The output for the test_existing_stats example is a bit confusing. It shows one output sample with content []. Since both input samples have a char_rep_ratio of 0.5, which is greater than the max_ratio of 0.4, they should both be filtered out, resulting in an empty dataset. To make this clearer, I suggest removing this output sample card to represent an empty output.


#### 📤 output data 输出数据
<div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 1:</strong> 2 videos</div><div class="media-section" style="margin-bottom:8px;"><div class="media-label" style="font-size:0.85em; color:#666; margin-bottom:4px; font-weight:500;">video1.mp4 +1 more:</div><div class="video-grid"><video src="../../../tests/ops/data/video1.mp4" controls width="320" style="margin:4px;"></video></div><details style='margin:6px 0;'><summary style='cursor:pointer; color:#0366d6;'>Show 1 more videos 展开更多视频</summary><div class="video-grid"><video src="../../../tests/ops/data/video2.mp4" controls width="320" style="margin:4px;"></video></div></details></div></div><div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 2:</strong> 2 videos</div><div class="media-section" style="margin-bottom:8px;"><div class="media-label" style="font-size:0.85em; color:#666; margin-bottom:4px; font-weight:500;">video2.mp4 +1 more:</div><div class="video-grid"><video src="../../../tests/ops/data/video2.mp4" controls width="320" style="margin:4px;"></video></div><details style='margin:6px 0;'><summary style='cursor:pointer; color:#0366d6;'>Show 1 more videos 展开更多视频</summary><div class="video-grid"><video src="../../../tests/ops/data/video3.mp4" controls width="320" style="margin:4px;"></video></div></details></div></div>
<div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 1:</strong> text</div><pre style="padding:6px; background:#f6f8fa; border-radius:4px; overflow-x:auto; white-space:pre; word-wrap:normal;">[]</pre></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The output for the test_all example is presented in a confusing way. It shows "Sample 1: text" followed by []. Since all input samples are filtered out in this case, the output dataset is empty. To avoid confusion, it would be clearer to have an empty "output data" section instead of showing a sample with empty content.

### test_key_value_grouper
```python
KeyValueGrouper(['meta.language'])
KeyValueGrouper()
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The example code KeyValueGrouper() is inconsistent with the provided input and output. Without arguments, KeyValueGrouper defaults to grouping by the text field (text_key). Since all texts are unique, this would result in three separate groups. The output shows grouping by language ('en' and 'zh'), which corresponds to KeyValueGrouper(group_by_keys=['meta.language']). Please update the code snippet to match the example's behavior.

Suggested change
KeyValueGrouper()
KeyValueGrouper(group_by_keys=['meta.language'])

### test_resize
```python
AudioFFmpegWrappedMapper('atrim', filter_kwargs={'end': 6}, capture_stderr=False)
AudioFFmpegWrappedMapper(filter_kwargs={'end': 6}, capture_stderr=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The example code is missing the filter_name parameter, but the explanation states that the 'atrim' filter is applied. To make the example clear and consistent, please add filter_name='atrim' to the AudioFFmpegWrappedMapper call.

Suggested change
AudioFFmpegWrappedMapper(filter_kwargs={'end': 6}, capture_stderr=False)
AudioFFmpegWrappedMapper('atrim', filter_kwargs={'end': 6}, capture_stderr=False)

```

#### 📥 input data 输入数据
<div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 1:</strong> text</div><pre style="padding:6px; background:#f6f8fa; border-radius:4px; overflow-x:auto; white-space:pre; word-wrap:normal;">[&#x27;[{\&#x27;images\&#x27;: [f&quot;http://localhost:{HTTPServer((\&#x27;localhost\&#x27;, 0), partial(SimpleHTTPRequestHandler, directory=osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)))).server_address[1]}/{os.path.basename(osp.join(osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\...</pre><details style='margin:6px 0;'><summary style='cursor:pointer; color:#0366d6;'>Show more 展开更多 (1905 more chars)</summary><pre style="padding:6px; background:#f6f8fa; border-radius:4px; overflow-x:auto; white-space:pre; word-wrap:normal;">[&#x27;[{\&#x27;images\&#x27;: [f&quot;http://localhost:{HTTPServer((\&#x27;localhost\&#x27;, 0), partial(SimpleHTTPRequestHandler, directory=osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)))).server_address[1]}/{os.path.basename(osp.join(osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)), \&#x27;img1.png\&#x27;))}&quot;], \&#x27;id\&#x27;: 1, \&#x27;image_bytes\&#x27;: []}, {\&#x27;images\&#x27;: [f&quot;http://localhost:{HTTPServer((\&#x27;localhost\&#x27;, 0), partial(SimpleHTTPRequestHandler, directory=osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)))).server_address[1]}/{os.path.basename(osp.join(osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)), \&#x27;img2.jpg\&#x27;))}&quot;, f&quot;http://localhost:{HTTPServer((\&#x27;localhost\&#x27;, 0), partial(SimpleHTTPRequestHandler, directory=osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)))).server_address[1]}/{os.path.basename(osp.join(osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)), \&#x27;img3.jpg\&#x27;))}&quot;], \&#x27;id\&#x27;: 2, \&#x27;image_bytes\&#x27;: [\&#x27;loaded\&#x27;, None]}, {\&#x27;images\&#x27;: [f&quot;http://localhost:{HTTPServer((\&#x27;localhost\&#x27;, 0), partial(SimpleHTTPRequestHandler, directory=osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)))).server_address[1]}/{os.path.basename(osp.join(osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)), \&#x27;img1.png\&#x27;))}&quot;, osp.join(osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)), \&#x27;img2.jpg\&#x27;), f&quot;http://localhost:{HTTPServer((\&#x27;localhost\&#x27;, 0), partial(SimpleHTTPRequestHandler, directory=osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)))).server_address[1]}/{os.path.basename(osp.join(osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)), \&#x27;img3.jpg\&#x27;))}&quot;], \&#x27;id\&#x27;: 3}, {\&#x27;images\&#x27;: [f&quot;http://localhost:{HTTPServer((\&#x27;localhost\&#x27;, 0), partial(SimpleHTTPRequestHandler, directory=osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)))).server_address[1]}/{os.path.basename(osp.join(osp.abspath(osp.join(osp.dirname(osp.realpath(__file__)), \&#x27;..\&#x27;, \&#x27;data\&#x27;)), \&#x27;img2.jpg\&#x27;))}&quot;], \&#x27;id\&#x27;: 4, \&#x27;image_bytes\&#x27;: [\&#x27;loaded\&#x27;, None]}]&#x27;]</pre></details></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The input data in this example is presented as a string of Python code, which is difficult to read and understand. For better clarity, please format the input data to show the actual sample structure, similar to other examples in the documentation. The same issue applies to the output data and the other example in this file.

#### 📥 input data 输入数据
<div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 1:</strong> 1 image</div><div class="media-section" style="margin-bottom:8px;"><div class="media-label" style="font-size:0.85em; color:#666; margin-bottom:4px; font-weight:500;">lena.jpg:</div><div class="image-grid"><img src="../../../tests/ops/data/lena.jpg" width="160" style="margin:4px;"/></div></div></div><div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 2:</strong> 1 image</div><div class="media-section" style="margin-bottom:8px;"><div class="media-label" style="font-size:0.85em; color:#666; margin-bottom:4px; font-weight:500;">lena-face.jpg:</div><div class="image-grid"><img src="../../../tests/ops/data/lena-face.jpg" width="160" style="margin:4px;"/></div></div></div><div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 3:</strong> 1 image</div><div class="media-section" style="margin-bottom:8px;"><div class="media-label" style="font-size:0.85em; color:#666; margin-bottom:4px; font-weight:500;">cat.jpg:</div><div class="image-grid"><img src="../../../tests/ops/data/cat.jpg" width="160" style="margin:4px;"/></div></div></div>

#### 📤 output data 输出数据
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The "output data" section for this example is empty. To make the documentation more helpful, it should either show the output images with blurred faces or provide a textual description of the expected output. An empty section can be confusing for users trying to understand what the operator does. This applies to the test_box_radius example as well.

#### 📥 input data 输入数据
<div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 1:</strong> 2 images</div><div class="media-section" style="margin-bottom:8px;"><div class="media-label" style="font-size:0.85em; color:#666; margin-bottom:4px; font-weight:500;">img1.png|img4.png:</div><div class="image-grid"><img src="../../../tests/ops/data/img1.png" width="160" style="margin:4px;"/><img src="../../../tests/ops/data/img4.png" width="160" style="margin:4px;"/></div></div></div><div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 2:</strong> 2 images</div><div class="media-section" style="margin-bottom:8px;"><div class="media-label" style="font-size:0.85em; color:#666; margin-bottom:4px; font-weight:500;">img2.jpg|img5.jpg:</div><div class="image-grid"><img src="../../../tests/ops/data/img2.jpg" width="160" style="margin:4px;"/><img src="../../../tests/ops/data/img5.jpg" width="160" style="margin:4px;"/></div></div></div><div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 3:</strong> 2 images</div><div class="media-section" style="margin-bottom:8px;"><div class="media-label" style="font-size:0.85em; color:#666; margin-bottom:4px; font-weight:500;">img3.jpg|img6.jpg:</div><div class="image-grid"><img src="../../../tests/ops/data/img3.jpg" width="160" style="margin:4px;"/><img src="../../../tests/ops/data/img6.jpg" width="160" style="margin:4px;"/></div></div></div>

#### 📤 output data 输出数据
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The "output data" section for this example is empty. To improve clarity, please include either the output images with the background removed or a description of what the output should look like. An empty output section can be misleading. This also applies to the test_single_image example.

<div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 1:</strong> 1 video</div><div class="media-section" style="margin-bottom:8px;"><div class="media-label" style="font-size:0.85em; color:#666; margin-bottom:4px; font-weight:500;">video11.mp4:</div><div class="video-grid"><video src="../../../{PROJECT_ROOT}/tests/ops/data/video11.mp4" controls width="320" style="margin:4px;"></video></div></div><div class='meta' style='margin:6px 0;'><table class='meta-table' style='border-collapse:collapse; width:100%; border:1px solid #e3e3e3;'><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>query_points</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[[320.0, 200.0], [500.72, 100.94]]</td></tr></table></div></div><div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 2:</strong> 1 video</div><div class="media-section" style="margin-bottom:8px;"><div class="media-label" style="font-size:0.85em; color:#666; margin-bottom:4px; font-weight:500;">video10.mp4:</div><div class="video-grid"><video src="../../../{PROJECT_ROOT}/tests/ops/data/video10.mp4" controls width="320" style="margin:4px;"></video></div></div><div class='meta' style='margin:6px 0;'><table class='meta-table' style='border-collapse:collapse; width:100%; border:1px solid #e3e3e3;'><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>query_points</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[[50.72, 100.94]]</td></tr></table></div></div>

#### 📤 output data 输出数据
<div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 1:</strong> empty</div><div class='meta' style='margin:6px 0;'><table class='meta-table' style='border-collapse:collapse; width:100%; border:1px solid #e3e3e3;'><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>camera_parameters_extrinsic</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 10, 3, 4]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>camera_parameters_intrinsic</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 10, 3, 3]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>depth_maps_depth_maps</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 10, 294, 518, 1]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>depth_maps_depth_conf</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 10, 294, 518]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_maps_from_projection_point_map</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 10, 294, 518, 3]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_maps_from_projection_point_conf</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 10, 294, 518]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_maps_from_unprojection_point_maps_from_unprojection</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[10, 294, 518, 3]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_tracks_track_list</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 10, 2, 2]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_tracks_vis_score</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 10, 2]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_tracks_conf_score</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 10, 2]</td></tr></table></div></div><div class="sample-card" style="border:1px solid #ddd; padding:12px; margin:8px 0; border-radius:6px; background:#fafafa; box-shadow:0 1px 3px rgba(0,0,0,0.1);"><div class="sample-header" style="background:#f8f9fa; padding:4px 8px; margin-bottom:6px; border-radius:3px; font-size:0.9em; color:#666; border-left:3px solid #007acc;"><strong>Sample 2:</strong> empty</div><div class='meta' style='margin:6px 0;'><table class='meta-table' style='border-collapse:collapse; width:100%; border:1px solid #e3e3e3;'><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>camera_parameters_extrinsic</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 18, 3, 4]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>camera_parameters_intrinsic</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 18, 3, 3]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>depth_maps_depth_maps</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 18, 392, 518, 1]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>depth_maps_depth_conf</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 18, 392, 518]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_maps_from_projection_point_map</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 18, 392, 518, 3]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_maps_from_projection_point_conf</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 18, 392, 518]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_maps_from_unprojection_point_maps_from_unprojection</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[18, 392, 518, 3]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_tracks_track_list</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 18, 1, 2]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_tracks_vis_score</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 18, 1]</td></tr><tr><th colspan='2' style='text-align:left; vertical-align:top; padding:6px 8px; font-weight:600; border-bottom:1px solid #e3e3e3;'>point_tracks_conf_score</th></tr><tr><td colspan='2' style='text-align:left; vertical-align:top; padding:4px 8px; padding-left:22px; border-bottom:1px solid #e3e3e3;'>[1, 18, 1]</td></tr></table></div></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The output sample is labeled as "empty", which is misleading because it contains a large table of metadata. To improve clarity, please consider changing the label to something more descriptive, for example, as metadata or 3D information. This applies to all output samples in this file.

### test_resize
```python
VideoFFmpegWrappedMapper('scale', filter_kwargs={'width': 400, 'height': 480}, capture_stderr=False)
VideoFFmpegWrappedMapper(filter_kwargs={'width': 400, 'height': 480}, capture_stderr=False)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The example code is missing the filter_name parameter, but the explanation states that the 'scale' filter is applied to resize videos. To ensure the example is correct and clear, please add filter_name='scale' to the VideoFFmpegWrappedMapper call.

Suggested change
VideoFFmpegWrappedMapper(filter_kwargs={'width': 400, 'height': 480}, capture_stderr=False)
VideoFFmpegWrappedMapper('scale', filter_kwargs={'width': 400, 'height': 480}, capture_stderr=False)

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.

1 participant