Skip to content

Import PIL image decoder for MMSeg byte inputs - #3269

Open
dajiaohuang wants to merge 1 commit into
activeloopai:mainfrom
dajiaohuang:fix-mmseg-byte-image-3264
Open

dajiaohuang wants to merge 1 commit into
activeloopai:mainfrom
dajiaohuang:fix-mmseg-byte-image-3264

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Oct 7, 2026 •

Copy link
Copy Markdown

Impact: Bug fix. ### Description: Fixes #3264. Import PIL Image for the existing bytes and bytearray decode path in the MMSeg transform. Array-backed inputs are unchanged. Validation: git diff --check passed. No tests or builds were run per assignment. ### Things to be aware of: The fix is scoped to the reported call path and preserves the existing API. ### Things to worry about: Tests and runtime validation were not run. ### Additional Context: No additional dependency or migration changes.

Summary by CodeRabbit

  • Chores
    • No user-visible changes are included in this update. Available features and workflows remain unchanged.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f6cda602-f26c-4be1-a8ec-73d1cad42dc4
📥 Commits

Reviewing files that changed from the base of the PR and between f432041 and 1ceeabc.

📒 Files selected for processing (1)
  • python/deeplake/integrations/mmseg/compose_transform_.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The MMSeg transform module now imports Image from PIL. The transform uses Image.open when handling byte-backed images.

Changes

MMSeg image handling

Layer / File(s) Summary
Image import
python/deeplake/integrations/mmseg/compose_transform_.py
Adds the PIL Image import used by the transform. This resolves the undefined name in the byte-backed image path.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 1ceea

The change adds the missing image import for byte-backed MMSeg inputs. No concrete merge-blocking issue is identified; this path was not runtime-validated.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: importing the PIL image decoder for MMSeg byte inputs. It is concise and specific.
Description check ✅ Passed The description covers the bug fix, linked issue, affected byte and bytearray path, unchanged array-backed path, technical scope, validation result, and known limitation that tests and builds were not…
Linked Issues check ✅ Passed The PR adds from PIL import Image in python/deeplake/integrations/mmseg/compose_transform_.py. This resolves the NameError in issue #3264 for the existing bytes and bytearray path that calls `Im…
Out of Scope Changes check ✅ Passed The reported change is limited to the missing Image import in the MMSeg transform. The import directly supports issue #3264 and introduces no unrelated dependency, migration, or API change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit finds an image byte,
The missing name now comes to light.
PIL joins the transform’s way,
Byte-backed pictures pass its gate,
And hops resume through pipeline straight.

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

[BUG] MMSeg transform cannot decode byte-backed images

1 participant