fix(avlivebody): gate Multi-HMR off by default
CI build oscope-of / build-check (push) Has been cancelled
CI build oscope-of / build-check (push) Has been cancelled
CoreML Multi-HMR inference ran synchronously on the main thread per video frame, saturating the run loop (beachball). Gate it behind AVBODY_MULTIHMR=1; default to skeleton-only rendering from the iPhone 91-joint ARKit stream.
This commit is contained in:
@@ -27,7 +27,15 @@ struct AVLiveBodyApp: App {
|
||||
struct ContentView: View {
|
||||
@StateObject private var consumer = USBSkeletonConsumer()
|
||||
private let controller = SceneController()
|
||||
private let multiHMR: MultiHMRCoreML? = MultiHMRCoreML()
|
||||
/// Multi-HMR mesh inference (CoreML, ~150-300 ms/frame) is OFF by
|
||||
/// default: it would saturate the main thread and beachball the UI.
|
||||
/// Skeleton-only rendering (iPhone 91-joint ARKit stream) otherwise.
|
||||
/// Enable on a capable, properly-threaded host with AVBODY_MULTIHMR=1.
|
||||
private let multiHMR: MultiHMRCoreML? = {
|
||||
guard ProcessInfo.processInfo.environment["AVBODY_MULTIHMR"] == "1"
|
||||
else { return nil }
|
||||
return MultiHMRCoreML()
|
||||
}()
|
||||
/// Placeholder intrinsics until a `.meta` frame supplies real ones.
|
||||
private let cameraK: [Float] = [
|
||||
672, 0, 336, 0, 672, 336, 0, 0, 1,
|
||||
|
||||
Reference in New Issue
Block a user