Skip to content
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

feat: update demo #33

Merged
merged 2 commits into from
Jan 8, 2025
Merged

feat: update demo #33

merged 2 commits into from
Jan 8, 2025

Conversation

Tohrusky
Copy link
Member

@Tohrusky Tohrusky commented Jan 8, 2025

Summary by Sourcery

Update the demo script to use mvf.ToRGB and mvf.ToYUV for color space conversion and format changes, and remove obsolete commented-out code for clarity.

New Features:

  • Introduce the use of mvf.ToRGB and mvf.ToYUV functions for color space conversion and format changes in the demo script.

Enhancements:

  • Simplify the demo script by removing commented-out code related to different model configurations and inference methods.

Copy link

sourcery-ai bot commented Jan 8, 2025

Reviewer's Guide by Sourcery

The pull request updates the demo script to use a new video source and a revised color processing pipeline, including support for 10-bit color depth. It also cleans up the script by removing commented-out code for unused model configurations.

Sequence diagram for updated video processing pipeline

sequenceDiagram
    participant Input as Input Video
    participant ColorConv1 as Color Conversion (To RGB)
    participant Model as Model Inference
    participant ColorConv2 as Color Conversion (To YUV)
    participant Output as Output Video

    Input->>ColorConv1: Raw video
    Note over ColorConv1: Convert to RGB
    Note over ColorConv1: 16-bit float samples
    ColorConv1->>Model: RGB format
    Model->>ColorConv2: Processed video
    Note over ColorConv2: Convert to YUV 4:2:0
    Note over ColorConv2: 10-bit depth
    Note over ColorConv2: Rec. 709 matrix
    ColorConv2->>Output: Final video
Loading

State diagram for video color format transitions

stateDiagram-v2
    [*] --> InputVideo
    InputVideo --> RGB: ToRGB()
    note right of RGB
        16-bit float samples
    end note
    RGB --> ProcessedRGB: Model inference
    ProcessedRGB --> YUV: ToYUV()
    note right of YUV
        10-bit depth
        4:2:0 chroma
        Rec.709 matrix
    end note
    YUV --> [*]
Loading

File-Level Changes

Change Details Files
Updated video source and color processing pipeline in demo script.
  • Changed default video source from 's.mkv' to '480.mkv'.
  • Converted video to RGB with 16-bit float samples before processing.
  • Converted video back to YUV 4:2:0 with 10-bit depth and Rec. 709 matrix after processing.
templates/ccrestoration_demo.py
Removed commented-out code related to different model configurations.
  • Deleted commented-out code for fp32 inference using RealESRGAN_AnimeJaNai_HD_V3_Compact_2x model.
  • Deleted commented-out code for AnimeSR_v2_4x model inference.
templates/ccrestoration_demo.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Tohrusky - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Tohrusky
Copy link
Member Author

Tohrusky commented Jan 8, 2025

@sourcery-ai review

@Tohrusky
Copy link
Member Author

Tohrusky commented Jan 8, 2025

@sourcery-ai summary

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Tohrusky - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding comments to document the rationale behind the specific color conversion parameters (16-bit float, 10-bit depth, Rec. 709 matrix) to help future maintainers understand these choices.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Tohrusky Tohrusky merged commit d7bc2c7 into TensoRaws:main Jan 8, 2025
1 check passed
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