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

[PR] Drawing heatmap for model debugging #41

Merged
merged 3 commits into from
Apr 30, 2020

Conversation

tucan9389
Copy link
Owner

@tucan9389 tucan9389 commented Apr 30, 2020

Related Issue

Summary

  • Support heatmap drawing for debugging confidence map and PAF

PR Points

  • StillImageViewControllerStillImageLineViewController
  • Add StillImageHeatmapViewController
  • Add PoseConfidenceMapDrawingView
  • Change PoseEstimator protocol
    • Add pairNames property
    • Add outputs property
  • Change TFLiteFlatArray struct type to class type

@tucan9389 tucan9389 self-assigned this Apr 30, 2020

class PoseConfidenceMapDrawingView: UIView {
typealias CGLine = (from: CGPoint, to: CGPoint)
var outputChannelIndexes: [Int] = [0]
Copy link
Collaborator

@syjdev syjdev Apr 30, 2020

Choose a reason for hiding this comment

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

Indexes (x)
Indices (o)

Copy link
Owner Author

Choose a reason for hiding this comment

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

indexes also correct on the meaning view, but I'll accept your suggestion in the technical view.

ref: https://english.stackexchange.com/a/3126

}
}

func drawRect(with rect: CGRect, value: Float32 = 0.0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

'value' is so abstract name.

I recommend to pass UIColor to drawRect function instead (value: Float32).
drawRect function have to no idea about DrawingConstant.

Copy link
Owner Author

Choose a reason for hiding this comment

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

It could be changed to alpha, confidence, or score.
Thanks for your opinion.

Copy link
Owner Author

Choose a reason for hiding this comment

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

@syjdev
I changed to componentOfVector 🙂

}

private extension CGPoint {
func scaled(to ratioSize: CGSize) -> CGPoint {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think,
This function's behavior mean 'coordinate move'.

Copy link
Owner Author

Choose a reason for hiding this comment

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

The term scale was used in affine transformation.
I think coordinate move corresponds to transform.
image
ref: https://neutrium.net/mathematics/basics-of-affine-transformation/

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍
Good,
I got the fact.
thx.

@tucan9389 tucan9389 merged commit d84aa66 into feature/multi-pose Apr 30, 2020
@tucan9389 tucan9389 deleted the drawing-heatmap branch April 30, 2020 05:45
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 this pull request may close these issues.

2 participants