Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsibility of each layer #5

Closed
3 tasks done
tucan9389 opened this issue Mar 14, 2020 · 0 comments · Fixed by #3
Closed
3 tasks done

Responsibility of each layer #5

tucan9389 opened this issue Mar 14, 2020 · 0 comments · Fixed by #3
Assignees

Comments

@tucan9389
Copy link
Owner

tucan9389 commented Mar 14, 2020

There are three layers for using tflite pose estimation model:

  • TFLiteImageInterpretor: the wrapper class for image preprocessing before inference
  • PoseEstimator: a simple protocol for abstraction
  • PoseNetPoseEstimator: concrete implement for PoseNet model

TFLiteImageInterpretor

TFLiteImageInterpretor is similar to VNCoreMLRequest. It has some pre-process logic for image and a tflite interpretor. Only TFLiteImageInterpretor class has a dependency with TensorFlowLiteSwift.

PoseEstimator

A simple protocol for abstraction. Users can create the concrete type conforming to PoseEstimator protocol and then use the estimator instance with the protocol, not concrete type. So except for the creation point, there is no use of the concrete type.

PoseNetPoseEstimator

PoseNetPoseEstimator is concrete type of PoseEstimator. It has PoseNet model specific information like input/output shape and normalization type.
For example, tensorflow/examples's PoseNet model needs following information:

  • input: [1, 257, 257, 3]
  • output: [1, 9, 9, 17]
  • input range: 0.0~1.0
  • input type: float32
  • quantized: false

TODO

  • preprocess
  • inference
  • postprocess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant