I was surprised that the session video did not discuss (unless I missed it, which is definitely possible) how to write custom components. Let's say I want to write my own PoseSelector component. For example to pick the person closest to the center of the frame, and to keep the selection consistent across frames in a video. Can I? And if yes, how?

Hello! Thanks for your question. You can definitely build your own custom components. In the session Get to know Create ML Components, Alejandro provides an example of how to do it by building a saliency transformer.

All you need to do is to conform to the Transformer protocol!

The only required method for you to implement is applied:

https://developer.apple.com/documentation/createmlcomponents/transformer/applied(to:eventhandler:)-38h86

Search for Required on the page

Tagged with: