[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe Scene Semantics API uses an ML model to provide real-time semantic information about a user's environment, classifying elements like sky, buildings, and people.\u003c/p\u003e\n"],["\u003cp\u003eThis API is ideal for enhancing AR experiences by enabling features such as environmental interaction, dynamic occlusion, and realistic lighting adjustments.\u003c/p\u003e\n"],["\u003cp\u003eWhile supporting a range of semantic labels with varying quality tiers, the API is primarily designed for outdoor scenes in portrait orientation and shares device compatibility with the Depth API.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize this API to understand the scene surrounding a user, improving AR experiences with features like guiding users and anchoring virtual objects to real-world elements.\u003c/p\u003e\n"]]],[],null,["# Understand the user's environment with the Scene Semantics API\n\n**Platform-specific guides** \n\n### Android (Kotlin/Java)\n\n- [Understand the user's environment on Android SDK (Kotlin/Java)](/ar/develop/java/scene-semantics)\n\n### Android NDK (C)\n\n- [Understand the user's environment on Android SDK (C)](/ar/develop/c/scene-semantics)\n\n### iOS\n\n- [Understand the user's environment on iOS](/ar/develop/ios/scene-semantics)\n\n### Unity (AR Foundation)\n\n- [Understand the user's environment on Unity (AR Foundation)](/ar/develop/unity-arf/scene-semantics)\n\nThe Scene Semantics API enables developers to understand the scene surrounding the user, which is needed for many high-quality AR experiences. Built on an ML model, the Scene Semantics API provides real-time semantic information, which complements existing geometric information in ARCore.\n\nGiven an image of an outdoor scene, the API returns a label for each pixel across a set of useful semantic classes, such a sky, building, tree, road, sidewalk, vehicle, person, and more. In addition to pixel labels, the Scene Semantics API also offers confidence values for each pixel label and an easy-to-use way to query the prevalence of a given label in an outdoor scene.\n\nYour browser does not support the video tag.\n\nFrom left to right, examples of an input image, the semantic image of pixel labels, and the corresponding confidence image:\n\nWith the Scene Semantics API, developers can identify specific scene components, such as roads and sidewalks to help guide a user through an unfamiliar city, people and vehicles to render occlusions on dynamic objects, sky to create a sunset at any time of the day, and buildings to modify their appearance and anchor virtual objects.\n\nSemantic labels and quality\n---------------------------\n\nThe Scene Semantics API provides multiple labels, each with a corresponding quality or reliability. Generally, the ML model is better able to predict classes of larger, more common objects/surfaces than classes of smaller or more rare objects/surfaces. The classes can be grouped into the following quality tiers, ranked from higher to lower:\n\n| Semantic label quality tiers ||\n|-----------------------|------------------------------------------|\n| Main scene components | - sky - building - tree - road - vehicle |\n| Major scene details | - sidewalk - terrain - structure - water |\n| Minor scene details | - object - person |\n\nDevice compatibility\n--------------------\n\nThe Scene Semantics API shares the same list of supported devices as the Depth API. Please refer to the [ARCore supported devices](/ar/devices) page for an up-to-date-list of devices that support both APIs.\n\nSupported use cases\n-------------------\n\nThe Scene Semantics API is designed for use in the following scenarios:\n\n1. **Outdoor scenes**: Supports outdoor scenes only and is not intended for indoor use cases.\n\n2. **Portrait orientation**: Should only be used in the device's default orientation mode (i.e. portrait). The quality of semantic labels is not guaranteed for landscape mode."]]