tucan9389 / PoseEstimation-CoreML

The example project of inferencing Pose Estimation using Core ML
https://github.com/motlabs/awesome-ml-demos-with-ios
MIT License
680 stars 136 forks source link

Fever problem #25

Open ColdStar007 opened 4 years ago

ColdStar007 commented 4 years ago

My iphone's back is very hot when i run this demo after 10 seconds, Could you tell me how to solve this problem? (sorry, my english is not very well, Please forgive my my words)

tucan9389 commented 4 years ago

My iphone's back is very hot when i run this demo after 10 seconds, Could you tell me how to solve this problem? (sorry, my english is not very well, Please forgive my my words)

@ColdStar007 iPhone overheating problem is an apple's known issue. Could you tell me your iPhone model? Is it iPhone X? I haven't solved the problem, but maybe you can do with more intervals between inferences.

ColdStar007 commented 4 years ago

iPhone11,CPU usage up to 99%,Maybe the scanning frequency is too high? But I didn't find where to control this,

tucan9389 commented 4 years ago

iPhone11,CPU usage up to 99%,Maybe the scanning frequency is too high? But I didn't find where to control this,

@ColdStar007 Actually I didn't implement the logic.

The following line is the point of starting prediction. You can call the method with delay time(like DispatchQueue("some.queue").ayncAfter method).

https://github.com/tucan9389/PoseEstimation-CoreML/blob/cd12795b5dad1398f87c430d71ce7136f5bac6a7/PoseEstimation-CoreML/Joint%20View%20Controller/JointViewController.swift#L135

I hope it helps you :)

ColdStar007 commented 4 years ago

iPhone11,CPU usage up to 99%,Maybe the scanning frequency is too high? But I didn't find where to control this,

@ColdStar007 Actually I didn't implement the logic.

The following line is the point of starting prediction. You can call the method with delay time(like DispatchQueue("some.queue").ayncAfter method).

https://github.com/tucan9389/PoseEstimation-CoreML/blob/cd12795b5dad1398f87c430d71ce7136f5bac6a7/PoseEstimation-CoreML/Joint%20View%20Controller/JointViewController.swift#L135

I hope it helps you :)

oh。。。。。 it works! thank you! and i have another question, how can i get a frame picture in the camera? i use this method now "snapshotView", but i'm worry about the picture's resolution is not enough, do you have any good idea?

tucan9389 commented 4 years ago

I googled with "snapshotView resolution" keyword. Did you see that? 🤔

https://stackoverflow.com/questions/4334233/how-to-capture-uiview-to-uiimage-without-loss-of-quality-on-retina-display