User Story
As a software developer,
I want to add test coverage verifying that video frames are properly preprocessed for model input in test_video_describer.py
so that we prevent silent failures caused by malformed model inputs.
Background
The current test mocks in test_video_describer.py (specifically test_get_video_descriptions and test_describe_frames) validate general method calls but don't verify critical preprocessing steps:
- The
VideoDescriber.describe_frames() converts BGR frames to RGB using cv2.cvtColor before model processing
- The Blip model expects RGB-format
PIL.Image inputs, but tests mock BlipProcessor without validating input transformations
- Unvalidated frame conversion risks subtle model performance degradation if preprocessing changes accidentally
Acceptance Criteria
User Story
As a software developer,
I want to add test coverage verifying that video frames are properly preprocessed for model input in
test_video_describer.pyso that we prevent silent failures caused by malformed model inputs.
Background
The current test mocks in
test_video_describer.py(specificallytest_get_video_descriptionsandtest_describe_frames) validate general method calls but don't verify critical preprocessing steps:VideoDescriber.describe_frames()converts BGR frames to RGB usingcv2.cvtColorbefore model processingPIL.Imageinputs, but tests mockBlipProcessorwithout validating input transformationsAcceptance Criteria
tests/test_video_describer.pyto validate frame preprocessing:BlipProcessorreceives RGB-formatPIL.Imageinputs intest_describe_frames@patchdecorators to capture actualdescribe_framesarguments instead of generic mocksnumpydescribe_framesconverts them to RGB before model processingcv2.cvtColor(frame, cv2.COLOR_BGR2RGB)is removed from production code