Open shiffman opened 6 months ago
Hi @sharellb, it occured to me after our meeting today that this could another thing to work on as you get started with learning about ml5.js development! For this issue, I think it's just a matter of going through the examples and incorporating the flipped
property into some (or all?) of them. After that you could do a review of the docs and propose to the web team where we might add infromation about the flipped
property (and note how it only works updated version of p5.js, I forget which number exactly!).
Also there is more info in the p5.js discussion! https://github.com/processing/p5.js/issues/6441
@ziyuan-linn anything I might be forgetting about this new feature of ml5?
I am for the idea of incorporating flipped
in all examples! I think for most use cases, the more natural mirror footage would be preferred.
I've been coming across "flipping videos" in my fall teaching recently. Curious if I understand it correctly: we ought to flip
the video element when it gets created and pass a flag to the model to flip the input as well?
Yes, two flags are needed. p5's flipped
option flips the appearance of the video when the video gets drawn with p5 functions like image
. The video source object (what gets passed to ml5) is untouched, so a flipped
flag also has to be passed to the ml5 model to flip the prediction result.
Thank you for your insight @ziyuan-linn! I got it to work. The way flipped
in p5 works does feel a little bit counterintuitive (one would think that flipping the input, once, is all that's needed) - but that's outside our purview!
Picking up on #127, we can now add the
flipped
property to a selection of examples that work with video input. This is a great starter issue for a new contributor!