Stay organized with collections
Save and categorize content based on your preferences.
GARSemanticMode
Summary
Enumerations
GARSemanticMode
GARSemanticMode
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-14 UTC.
[null,null,["Last updated 2025-07-14 UTC."],[[["\u003cp\u003e\u003ccode\u003eGARSemanticMode\u003c/code\u003e controls the Scene Semantics API, which uses machine learning to label camera feed pixels with semantic information like "sky" or "grass".\u003c/p\u003e\n"],["\u003cp\u003eThis API primarily supports outdoor scenes and may not be reliable indoors.\u003c/p\u003e\n"],["\u003cp\u003eSome ARCore devices do not support Scene Semantics; compatibility can be checked using \u003ccode\u003eisSemanticModeSupported:\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eBy default, Scene Semantics is disabled (\u003ccode\u003eGARSemanticModeDisabled\u003c/code\u003e); enable it using \u003ccode\u003eGARSessionConfiguration.semanticMode\u003c/code\u003e for access to semantic data through methods like \u003ccode\u003eGARFrame::acquireSemanticImage:\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# GARSemanticMode\n===============\n\nSummary\n-------\n\n| ### Enumerations ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|\n| [GARSemanticMode](#garsemanticmode)`{` ` `[GARSemanticModeDisabled](#garsemanticmodedisabled)` = 0,` ` `[GARSemanticModeEnabled](#garsemanticmodeenabled)` = 1` `}` | enum Describes the behavior of the Scene Semantics API. |\n\nEnumerations\n------------\n\n### GARSemanticMode\n\n```text\n GARSemanticMode\n``` \nDescribes the behavior of the Scene Semantics API.\n\nScene Semantics uses a machine learning model to label each pixel from the camera feed with a [GARSemanticLabel](/ar/reference/ios/group/GARSemanticLabel#garsemanticlabel). See [the Scene Semantics Developer Guide](https://developers.google.com/ar/develop/ios/scene-semantics) for more information.\n\nThe Scene Semantics API is currently able to distinguish between outdoor labels specified by [GARSemanticLabel](/ar/reference/ios/group/GARSemanticLabel#garsemanticlabel). Usage indoors is currently unsupported and may yield unreliable results. Some ARCore supported devices do not support the Scene Semantics API. Use [isSemanticModeSupported: (GARSession(Semantics))](/ar/reference/ios/category/GARSession(Semantics)#issemanticmodesupported:) to query for support for Scene Semantics. Affected devices are also indicated on the [ARCore supported devices page](https://developers.google.com/ar/devices).\n\nThe default value is [GARSemanticModeDisabled](/ar/reference/ios/group/GARSemanticMode#garsemanticmodedisabled). Use [GARSessionConfiguration.semanticMode](/ar/reference/ios/category/GARSessionConfiguration(Semantics)#semanticmode) and [setConfiguration:error: (GARSession)](/ar/reference/ios/interface/GARSession#setconfiguration:error:)to set the desired mode.\n\n| Properties ||\n|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| GARSemanticModeDisabled | The Scene Semantics API is not enabled. Calls to `GARFrame::acquireSemanticImage:`, `GARFrame::acquireSemanticConfidenceImage:`, and `GARFrame::fractionForSemanticLabel:error:` will not return valid results. This is the default mode. |\n| GARSemanticModeEnabled | The Scene Semantics API is enabled. Calls to `GARFrame::acquireSemanticImage:`, `GARFrame::acquireSemanticConfidenceImage:`, and `GARFrame::fractionForSemanticLabel:error:` will return valid results. Use [GARSessionConfiguration.semanticMode](/ar/reference/ios/category/GARSessionConfiguration(Semantics)#semanticmode) and [setConfiguration:error: (GARSession)](/ar/reference/ios/interface/GARSession#setconfiguration:error:)to set the desired mode. |"]]