Test and harden long-image OCR slicing#369
Conversation
|
Warning Review limit reached
Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughLong-image OCR slicing now averages row density around candidate cuts and passes slice metadata into result merging. Overlapping slices deduplicate repeated boundary tokens, while non-overlapping safe cuts preserve them. Tests cover both behaviors and use canvas-based image fixtures. ChangesOCR overlap handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant PaddleOCRService
participant LongImageOcrSlicer
participant ExecuteSliceAsync
PaddleOCRService->>LongImageOcrSlicer: plan OCR slices
LongImageOcrSlicer-->>PaddleOCRService: OcrImageSlice list
loop each slice
PaddleOCRService->>ExecuteSliceAsync: process slice
ExecuteSliceAsync-->>PaddleOCRService: OCR text
end
PaddleOCRService->>LongImageOcrSlicer: merge slice and text pairs
LongImageOcrSlicer-->>PaddleOCRService: merged OCR text
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
PR Check ReportSummary
Test Results
Code Quality
Test Artifacts
LinksThis report is auto-generated by GitHub Actions |
dc5d5c4 to
286c60f
Compare
Summary
Accuracy evidence
A local ChineseV3 A/B probe used a generated 1000x7000 image with 116 labeled Chinese/English lines:
The real-engine probe is not part of CI because the current Paddle inference runtime is Windows-specific and OCR output depends on native runtime/font rendering. The deterministic boundary behavior is covered by unit and service-level tests instead.
Validation
dotnet test TelegramSearchBot.Test/TelegramSearchBot.Test.csproj --filter "FullyQualifiedName~LongImageOcrSlicerTests" --configuration Debug --no-restore: 12/12 passeddotnet build TelegramSearchBot.sln --configuration Release: succeeded with 0 errors (434 existing warnings)Summary by CodeRabbit