Skip to content

Conversation

@kangyizhang
Copy link
Contributor

@kangyizhang kangyizhang commented Sep 5, 2019

tf.browser.fromPixel is using HTMLVideoElement.videoHeight and videoWidth now. The previous fake video stream does not populate videoHeight and videoWidth for the upstream HTMLVideoElement.

Using a test video to mock the video source. The video size is used as the output tensor shape so the params passed to API are not used in tests. This is because faking media stream does not populate videoHeight and videoWidth for HTMLVideoElement.

The resizing tests works fine because the cropAndRezide() function still works fine.

The API has been tested and real webcam works the same as before.


This change is Reviewable

Copy link
Contributor

@nsthorat nsthorat left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 5 files at r1.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @nsthorat)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants