-
Notifications
You must be signed in to change notification settings - Fork 20
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
[PR] Make some empty class and struct for interpretor #3
Conversation
} | ||
|
||
protocol PoseEstimator { | ||
func predict(with pixelBuffer: CVPixelBuffer) -> PoseEstimationResult |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the imeplementation of protocol PoseEstimator,
behavior of predict is similar to estimate or inference.
So I think, 'estimate' or 'inference' are more suitable function name than 'predict'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your suggestion. I'll change to inference
.
@@ -9,12 +9,11 @@ | |||
import UIKit | |||
|
|||
class ViewController: UIViewController { | |||
|
|||
let poseEstimator: PoseEstimator = PoseNetPoseEstimator() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the mean of NetPose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PoseNet is the paper for pose estimation distributed in 2015. PoseNetPoseEstimator
stand for PoseNet
+ PoseEstimator
which means that the pose estimator implementing PoseNet
tflite model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank, I undetstood.
|
||
import CoreVideo | ||
|
||
enum PoseEstimationResult { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you ever seen, https://developer.apple.com/documentation/swift/result ?
I think, you need to implement no fail case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Thanks for your advice.
// <#TODO#> | ||
} | ||
|
||
var keypointsAndScore: [(position: CGPoint, score: CGFloat)] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keypoint have a score.
So, keypointsAndScore have duplicated meaning.
And I can implement, var keypoints: [Keypoint] { ... }.
This is more simple, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@syjdev
👍 Right, I replaced to keypoints: [Keypoints]
property.
@syjdev |
Related Issue
PR Point
TFLiteImageInterpretor
for implementing pre-process of image inputPoseEstimator
protocol for abstractionPoseNetPoseEstimator
for specifying input/output and model name of PoseNet tflite file