A method, apparatus, device, and medium for background clustering of indoor scene images.
By segmenting indoor scene images and constructing graph structures, and using the differential weights of node attribute information to suppress foreground interference, the system accurately extracts background semantic features from indoor scene images with dynamic foreground interference. This solves the problem of blurred clustering boundaries in existing technologies and improves automation and accuracy.
Patent Information
- Application Number
- CN202611459972.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-18
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies struggle to accurately extract background semantic features when processing indoor scene images with dynamic foreground interference, resulting in blurred cluster boundaries. This necessitates extensive manual intervention and parameter tuning, making it difficult to meet the application requirements for high accuracy.
By segmenting indoor scene images into blocks and constructing a graph structure, differential weights based on node attribute information are used to suppress foreground interference. A pre-trained encoder is then used for global encoding and clustering to obtain the global background embedding.
It effectively eliminates foreground interference, ensures the accuracy of background feature extraction and the clarity of clustering results, reduces manual intervention, and improves the automation and accuracy of clustering.
Smart Images

Figure CN123119081A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, and medium for background clustering of indoor scene images. Background Technology
[0002] Background clustering of indoor scene images is a fundamental task for environmental modeling and behavior analysis, and it has significant application value in fintech surveillance and security scenarios as well as intelligent healthcare environments. However, the presence of dynamic foreground elements such as people moving around in real-world scenarios significantly interferes with the extraction of inherent background patterns. Current technologies typically rely on manually designed operators such as SIFT (Scale-Invariant Feature Transform) or HOG (Histogram of Oriented Gradients) combined with unsupervised clustering algorithms to segment image regions. These methods focus on capturing local edges and texture information, but they are poorly adapted to indoor environments with drastic lighting changes or complex textures, and it is difficult to effectively distinguish between foreground and background based on high-level semantics.
[0003] Furthermore, with the popularization of deep learning, models including variational autoencoders, generative adversarial networks, and pure transformer architectures are widely used to learn high-level representations of images. However, when processing large amounts of image patch information, the global attention mechanism of these networks usually treats all regions in the image equally, causing the features of foreground objects to significantly affect the final embedded representation of the background region, making the resulting cluster boundaries unclear. This technical limitation means that in practical applications, a large amount of manpower is often required for repeated data screening and result correction, and the work efficiency is highly dependent on manual parameter tuning experience, making it difficult to meet the actual demand for high accuracy. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and medium for background clustering of indoor scene images, aiming to solve the following technical problem: how to accurately extract background semantic features from indoor scene images containing dynamic foreground interference.
[0005] Firstly, a background clustering method for indoor scene images is provided, including: In response to receiving a target indoor scene image, the target indoor scene image is divided into blocks to obtain multiple image blocks, and the initial node features corresponding to each image block are extracted; Based on the initial node features and the spatial location corresponding to each image block, a graph structure representing the relationship between the image blocks is constructed; Obtain the node attribute information corresponding to each node in the graph structure. The node attribute information is used to indicate whether the region to which the node belongs is a foreground region or a background region. Based on the node attribute information, the aggregation weight of each node in the graph structure is determined during feature aggregation; wherein, the aggregation weight of nodes belonging to the background region is greater than the aggregation weight of nodes belonging to the foreground region. Based on the graph structure, the aggregation weights, and the initial node features, feature aggregation is performed on the initial node features to obtain aggregated node features; The aggregated node features are input into a pre-trained encoder, and the pre-trained encoder is used to globally encode the aggregated node features to obtain a global background embedding. Clustering is performed on the global background embedding to obtain the background clustering result of the target indoor scene image.
[0006] Secondly, a background clustering device for indoor scene images is provided, comprising: The segmentation unit is used to segment the target indoor scene image into multiple image blocks in response to receiving the target indoor scene image, and to extract the initial node features corresponding to each image block. The construction unit is used to construct a graph structure representing the relationship between the image blocks based on the initial node features and the spatial location corresponding to each image block; The acquisition unit is used to acquire node attribute information corresponding to each node in the graph structure, wherein the node attribute information is used to indicate whether the region to which the node belongs is a foreground region or a background region. The determining unit is used to determine the aggregation weight of each node in the graph structure when performing feature aggregation based on the node attribute information; wherein the aggregation weight of the node belonging to the background region is greater than the aggregation weight of the node belonging to the foreground region. An aggregation unit is used to perform feature aggregation on the initial node features based on the graph structure, the aggregation weights, and the initial node features to obtain aggregated node features; An encoding unit is used to input the aggregated node features into a pre-trained encoder, and use the pre-trained encoder to perform global encoding on the aggregated node features to obtain a global background embedding. The clustering unit is used to cluster the global background embedding to obtain the background clustering result of the target indoor scene image.
[0007] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the background clustering method for indoor scene images described above.
[0008] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the background clustering method for the aforementioned indoor scene images.
[0009] The aforementioned scheme for background clustering of indoor scene images, including the method, apparatus, computer equipment, and storage medium, first divides the indoor scene image into blocks and extracts the initial node features of each block. Based on this, a graph structure reflecting the relationships between the image blocks is constructed. Since the node attribute information indicates whether each node belongs to the foreground or background, the aggregation weight of each node during feature aggregation can be determined accordingly, with the aggregation weight of background nodes higher than that of foreground nodes. When performing feature aggregation based on this weight, the contribution of foreground nodes to the aggregation result is actively reduced, and the aggregated node features are mainly concentrated in the background region. After global encoding by a pre-trained encoder, a global background embedding is generated. This embedding eliminates foreground interference and integrates the background information of the entire image. Furthermore, clustering is performed on this embedding, and scene segmentation can be achieved based on the inherent attributes of the background. Through the above technical means, this method suppresses foreground interference in the feature aggregation stage through differentiated weight allocation, ensuring that subsequent encoding and clustering are based on clean background features, thereby effectively solving the problem of accurately extracting background semantic features from indoor scene images containing dynamic foreground interference. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of an application environment for a background clustering method for indoor scene images according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating a background clustering method for indoor scene images according to an embodiment of the present invention; Figure 3 yes Figure 2 A flowchart illustrating a specific implementation method of step S1; Figure 4 yes Figure 2 A flowchart illustrating a specific implementation method of step S2; Figure 5 yes Figure 2 A flowchart illustrating a specific implementation of step S4; Figure 6 yes Figure 2A flowchart illustrating a specific implementation of step S6; Figure 7 This is a schematic diagram of a background clustering device for indoor scene images in one embodiment of the present invention; Figure 8 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 9 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] The background clustering method for indoor scene images provided in this invention can be applied to, for example... Figure 1In this application environment, the client communicates with the server via a network. The client is deployed in an indoor monitoring scenario to acquire indoor scene images containing dynamic foreground interference and transmit these images to the server via the network. The server receives the indoor scene image, divides the indoor scene image into blocks to obtain multiple image blocks, and extracts the initial node features corresponding to each image block. Based on the initial node features and the spatial location of each image block, a graph structure representing the relationship between the image blocks is constructed. Node attribute information corresponding to each node in the graph structure is obtained, and the node attribute information is used to indicate whether the region to which the node belongs is a foreground region or a background region. Based on the node attribute information, the aggregation weight of each node in the graph structure is determined during feature aggregation, wherein the aggregation weight of nodes belonging to the background region is greater than the aggregation weight of nodes belonging to the foreground region. Based on the graph structure, the aggregation weight, and the initial node features, feature aggregation is performed on the initial node features to obtain aggregated node features. The aggregated node features are input into a pre-trained encoder, and the pre-trained encoder is used to globally encode the aggregated node features to obtain a global background embedding. The global background embedding is clustered to obtain the background clustering result of the target indoor scene image. The server feeds back the background clustering results to the client, or outputs the background clustering results to a subsequent scene analysis module for applications such as security monitoring area identification in fintech scenarios and intelligent care environment modeling in healthcare scenarios. The client can be, but is not limited to, various smart cameras, monitoring terminals, medical care equipment, personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will now be described in detail through specific embodiments.
[0014] Please see Figure 2 , Figure 2This is a flowchart illustrating a background clustering method for indoor scene images provided in an embodiment of the present invention. The method can be executed by electronic devices with image processing and computing capabilities (e.g., servers, workstations, dedicated image processing chips, or virtual machine instances deployed in the cloud). It is particularly suitable for application scenarios requiring scene understanding, environmental modeling, and intelligent analysis of indoor surveillance video streams or static images. For example, in the fintech field, it can be used for background area identification and anomaly warning in security surveillance footage of branch offices and self-service banking areas; in the healthcare field, it can be used for intelligent care environment modeling and personnel behavior analysis in surveillance images of inpatient wards, operating rooms, and rehabilitation centers. This method aims to solve the problems of difficult background feature extraction and clustering bias caused by frequent dynamic foreground interference (such as people walking, temporary placement or movement of objects, pet activities, etc.) in indoor scene images. Specifically, the method includes the following steps: S1, in response to receiving the target indoor scene image, the target indoor scene image is divided into blocks to obtain multiple image blocks, and the initial node features corresponding to each image block are extracted.
[0015] In specific implementation, in response to receiving a target indoor scene image, the target indoor scene image is segmented. The target indoor scene image is typically an RGB format color image, and its original resolution may vary depending on the acquisition device. To ensure consistency of subsequent network model input and optimize computational efficiency, the target indoor scene image can be normalized before segmentation, scaling it to a preset standard resolution, such as 224×224×3 pixels. Further, the segmentation process involves dividing the normalized image into multiple non-overlapping image blocks according to a preset uniform grid partitioning strategy. For example, the image can be divided into a 14×14 grid structure, resulting in a total of 196 non-overlapping image blocks of equal size. Each image block is considered a node in a graph structure, transforming the originally continuous, high-dimensional image data into a discrete, localized set of nodes, providing a basic data organization unit for subsequent local spatial neighborhood modeling and semantic association analysis using graph neural networks.
[0016] Furthermore, after the block processing is completed, feature extraction is performed on each image block to obtain the initial node features corresponding to each image block. Feature extraction is a process of forward reasoning using a feature extraction network to analyze the pixel information within the image block. This process encodes the low-level visual information contained in the image block, such as texture details, edge contours, color distribution, structural morphology, and high-frequency noise, into a fixed-dimensional feature vector, which is the initial node feature. Furthermore, the feature extraction network can adopt a lightweight convolutional neural network architecture, such as MobileNetV3, which has a compact structure and moderate computational cost, reducing hardware resource consumption while ensuring feature representation capabilities. The output dimension of the feature extraction network can be set to, for example, 256 dimensions. This dimension can fully retain the key visual information within the image block without causing excessive computational burden on subsequent graph networks due to excessive dimensionality. The extracted initial node features not only describe the visual attributes of the image block itself but also serve as core data for node computation in subsequent graph structure construction and feature aggregation steps.
[0017] See Figure 3 In some preferred embodiments, the step of segmenting the target indoor scene image into multiple image blocks and extracting the initial node features corresponding to each image block includes: S11, dividing the target indoor scene image into multiple non-overlapping image blocks of equal size; S12, using a feature extraction network to extract features from each non-overlapping image block to obtain a feature vector of a preset dimension corresponding to each non-overlapping image block; S13, determining the feature vector of the preset dimension corresponding to each non-overlapping image block as the initial node features.
[0018] In practice, block partitioning and feature extraction are the foundation for constructing the graph structure and subsequent feature aggregation, and their quality directly affects the processing effect of subsequent steps. The choice of block partitioning strategy determines the number and granularity of nodes in the graph structure, while the performance of the feature extraction network determines the representational ability of the initial node features. This embodiment uses non-overlapping uniform block partitioning and a lightweight convolutional neural network to ensure both representational quality and computational efficiency. The specific implementation method is as follows: First, the target indoor scene image is divided into multiple non-overlapping image blocks of equal size. A uniform grid partitioning strategy is used, for example, dividing the size-normalized image into a 14×14 grid, resulting in 196 identical non-overlapping sub-blocks. Non-overlapping partitioning means that there are no pixel overlaps between adjacent image blocks. This method ensures that each pixel belongs to only one image block, avoiding computational redundancy and boundary ambiguity caused by overlap, and also ensuring that the entire graph structure accurately covers the entire area of the original image without omitting any pixel information. Furthermore, the size of the image blocks can be adjusted according to the complexity of the target scene. Smaller image blocks provide finer local details, while larger image blocks better capture semantic information. This embodiment uses a 16×16 pixel image block size, achieving a good balance between the two.
[0019] Furthermore, a feature extraction network is used to extract features from each of the non-overlapping image patches. The feature extraction network can be a lightweight convolutional neural network, such as MobileNetV3. Each non-overlapping image patch is input into the feature extraction network, and after cascading forward inference through multiple convolutional layers, pooling layers, and fully connected layers, visual features such as texture, edge contours, color distribution, and spatial structure contained within the image patch are extracted. These features are then mapped to a feature vector of a preset dimension, such as a 256-dimensional feature vector, through the network's output layer. This feature vector is a compact and abstract description of the visual content of the image patch, preserving key identification information while eliminating irrelevant noise and redundant information.
[0020] Furthermore, the feature vector of the preset dimension corresponding to each of the non-overlapping image patches is determined as the initial node feature. All initial node features together constitute a feature set, which serves as input data for subsequent graph structure construction and feature aggregation.
[0021] This embodiment achieves efficient discretization of the entire image's features through non-overlapping partitioning and convolutional neural network feature extraction, transforming the macroscopic image into a set of discrete nodes that are easy for graph network processing. Non-overlapping partitioning ensures clear data boundaries and avoids interference introduced by overlapping computations; the pre-defined feature vectors unify the representation format of each image block, providing a guarantee for subsequent standardized graph structure processing; furthermore, the use of a lightweight convolutional neural network for feature extraction reduces computational overhead while ensuring feature quality, making this solution equally applicable and flexible in real-time applications.
[0022] S2, Based on the initial node features and the spatial location corresponding to each image block, construct a graph structure representing the relationship between the image blocks.
[0023] In specific implementation, after obtaining the initial node features of all image patches, a graph structure representing the association between the image patches is constructed based on the initial node features and the spatial location corresponding to each image patch. The graph structure consists of a node set V and an edge set E, where each node in node set V corresponds one-to-one with the aforementioned image patch, and the edges in edge set E are used to describe the topological connection relationship between two nodes. Furthermore, the process of constructing the graph structure needs to comprehensively consider the spatial distance between nodes (i.e., the degree of physical proximity) and the semantic similarity between node features (i.e., the degree of visual content consistency), establishing the edge set through a dual-determination mechanism. Specifically, for any two nodes, firstly, the Euclidean distance between the centers of their corresponding image patches is calculated. If this distance is less than or equal to a preset spatial adjacency threshold, a spatial adjacency edge is established; simultaneously, the cosine similarity between the two initial node features is calculated. If this similarity is greater than a preset semantic similarity threshold, a semantic similarity edge is established. Through this bimodal decision-making mechanism, the edge set in the graph structure includes both local edges reflecting spatial proximity and long-range semantic edges reflecting cross-regional visual consistency, thus making the graph structure's topology richer and more reasonable, and providing a more comprehensive information propagation path for subsequent feature aggregation.
[0024] See Figure 4 In some preferred embodiments, the graph structure includes multiple nodes, each node corresponding one-to-one with a plurality of image patches, and the initial node feature corresponding to each node is the initial node feature of the image patch corresponding to that node; the step of constructing a graph structure representing the association between the image patches based on the initial node features and the spatial position corresponding to each image patch includes: S21, for any two nodes in the graph structure, calculating the center distance between the two nodes based on the spatial coordinates of the image patches corresponding to the two nodes respectively, and calculating the feature similarity between the two nodes based on the initial node features corresponding to the two nodes respectively; S22, when the S23. When the center distance is less than or equal to a preset spatial adjacency threshold, a spatial adjacency edge is established between the two nodes; S24. When the feature similarity is greater than a preset semantic similarity threshold, a semantic similarity edge is established between the two nodes; S25. Based on the splicing result of the initial node features corresponding to the two nodes and the spatial coordinate offset between the image blocks corresponding to the two nodes, the initial edge weights of the spatial adjacency edge and the semantic similarity edge are calculated, and the initial edge weights are normalized to obtain normalized edge weights; S26. Based on the spatial adjacency edge, the semantic similarity edge, and the normalized edge weights, the graph structure is constructed.
[0025] In practical implementation, the graph structure serves as the topological skeleton for subsequent feature aggregation operations, and the rationality of its edge establishment criteria and weight calculation methods directly determines the effectiveness of feature aggregation. In traditional methods, graph structures often rely solely on Euclidean distance between image patches to establish connections. While this approach reflects spatial proximity, it fails to capture semantic relationships between visually similar but spatially distant regions. This results in the inability to establish effective feature propagation paths between background regions with consistent textures but spatially separated areas (such as repeated wallpaper or floor patterns in the same room), limiting the receptive field of the graph network. This embodiment overcomes these limitations by introducing both spatial adjacency and semantic similarity as conditions for edge establishment, and by employing a dynamic weight calculation method based on feature splicing and spatial offset. The specific implementation is as follows: First, the graph structure includes multiple nodes, each corresponding one-to-one with a plurality of image patches. The initial node features of each node are the initial node features of the image patch to which it corresponds. For any two nodes in the graph structure (denoted as node i and node j), the center distance between the two nodes is calculated based on the spatial coordinates of the image patches corresponding to each node. The spatial coordinates refer to the pixel coordinates of the image patch in the original image, for example, using the horizontal and vertical coordinates of the top-left pixel of the image patch. The center distance is calculated using the Euclidean distance formula. Simultaneously, based on the initial node features corresponding to each of the two nodes, the feature similarity between the two nodes is calculated. The feature similarity is measured using cosine similarity, which is calculated based on the cosine of the angle between two vectors in vector space to characterize the closeness of two vectors in direction. This metric is not affected by the vector magnitude and can better reflect the shape similarity of features. The specific calculation formula is as follows: s ij = (v i T v j ) / (||v i || · ||v j ||).
[0026] In the above formula, s ij v represents the cosine similarity between the i-th node and the j-th node; i With v j Let v represent the initial node feature vectors of nodes i and j, respectively, with each feature vector having a dimension of 256; numerator v i T v j The dot product (inner product) of two eigenvectors is represented by the denominator ||v. The larger the dot product, the smaller the angle between the two vectors in their directions. i ||and||v j|| represents the L2 norm (i.e., the Euclidean length of the vector) of the two feature vectors. The cosine similarity ranges from [-1, 1]. The closer the value is to 1, the closer the two nodes are visually and semantically; the closer the value is to -1, the more visually opposite they are; a value of 0 indicates that they are orthogonal and have no significant similarity.
[0027] Further, based on the calculated center distance and feature similarity, two types of edge establishment judgments are performed. First, when the center distance is less than or equal to a preset spatial adjacency threshold, a spatial adjacency edge is established between the two nodes. The preset spatial adjacency threshold is used to limit the physical proximity range between nodes, and its value can be set according to the size of the image patch and the actual application requirements. For example, it can be set to √2 image patch units, that is, when the offset of the two nodes in the row direction and column direction does not exceed 1 image patch, they are determined to be spatially adjacent. This threshold setting ensures that the spatial adjacency edge mainly covers image patches that are spatially adjacent in the image, reflecting the continuity and consistency of the local area. Second, when the feature similarity is greater than a preset semantic similarity threshold, a semantic similarity edge is established between the two nodes. The preset semantic similarity threshold is used to measure the degree of proximity of the two nodes in visual content, for example, it can be set to 0.7. Further, when the above cosine similarity calculation value is greater than 0.7, it indicates that the two image patches are highly consistent in terms of texture, edge, color distribution, etc. Even if they are not adjacent in the image, a semantic connection should be established to facilitate the long-distance aggregation of background features. With the above dual judgment conditions, as long as the node pair meets any one of the edge establishment conditions (spatial proximity or semantic similarity), a connecting edge can be established, thereby forming a graph edge set that is comprehensive and has rich association information.
[0028] Furthermore, after the edges are established, for any two nodes with a connecting edge, the weight of each edge is calculated. This weight measures the strength of the association between the two nodes and is the weight coefficient for the weighted summation in the subsequent feature aggregation step. Specifically, the calculation method is as follows: based on the splicing results of the initial node features corresponding to the two nodes and the spatial coordinate offset between the image patches corresponding to the two nodes, the initial edge weights are calculated using a multilayer perceptron network and normalized using an activation function. The mathematical formula for calculating these edge weights can be expressed as: w ij =σ(MLP([v i || v j || Δ xy ])).
[0029] In the above formula, w ijThis represents the normalized edge weight between node i and node j; σ represents the Sigmoid activation function, which compresses the output values of the multilayer perceptron network to the (0,1) interval, ensuring that the edge weights have a standardized numerical range for easier subsequent operations; MLP represents the multilayer perceptron network, for example, a network structure containing two fully connected layers, where the input layer dimension is the dimension after feature concatenation (if the feature dimension is 256, the concatenation dimension is 512, plus the two-dimensional coordinate offset, a total of 514 dimensions), the intermediate layer dimension is, for example, 128, and the output layer dimension is 1; [v i || v j The symbol ] represents the concatenation of the initial node feature vectors corresponding to node i and node j, respectively, thereby fusing the visual features of the two nodes into a joint feature vector; Δ xy This represents the spatial coordinate offset between the image patches corresponding to two nodes. This offset is a two-dimensional vector obtained by normalizing the difference in the center coordinates of the two nodes, and its value range is [-1, 1]. The design of this formula allows the edge weights to simultaneously consider the visual feature similarity and spatial position relationship of the nodes, realizing a comprehensive measurement and refined representation of the association strength between nodes.
[0030] Furthermore, based on the spatial adjacency edges, semantically similar edges, and the calculated normalized edge weights established above, a complete graph structure is constructed. This graph structure is typically stored in the form of an adjacency matrix or edge list, explicitly recording the node set, edge set, and the edge weight corresponding to each edge. This graph structure will serve as input data for subsequent feature aggregation steps, participating in the computation process of graph neural networks or graph attention networks.
[0031] This embodiment establishes edges based on both spatial adjacency and semantic similarity, enabling the graph structure to reflect both the spatial topological layout of the image and the visual content relationships between local regions. Compared to schemes that rely solely on a single dimension for graph construction, it can more comprehensively represent the intrinsic relationships between nodes and avoid introducing unreasonable edge connections (e.g., connecting adjacent blocks with vastly different textures simply because of spatial proximity, or connecting distant blocks with the same semantics simply because of feature similarity). Furthermore, edge weights are calculated using a multilayer perceptron based on feature concatenation and spatial offset, ensuring that weight allocation depends not only on feature similarity but also on spatial relative positional relationships, significantly improving the accuracy of characterizing the strength of relationships between nodes. This dual-modal graph structure construction method lays a solid topological foundation for subsequent differentiated feature aggregation.
[0032] S3, obtain the node attribute information corresponding to each node in the graph structure, the node attribute information is used to indicate whether the area to which the node belongs is a foreground area or a background area.
[0033] In specific implementation, after the graph structure is constructed, the node attribute information corresponding to each node in the graph structure is obtained. The node attribute information is used to indicate whether the region to which the node belongs is a foreground region or a background region. In a specific implementation, a pre-trained object detection model (such as YOLOv3) can be used to perform object detection on the original indoor scene image, detecting rectangular bounding box regions containing dynamic foreground objects such as people, animals, and temporary objects in the image; further, based on the detection results, a corresponding binary mask label is generated for each image patch: if the image patch overlaps with any foreground bounding box, the node corresponding to the image patch is marked as a foreground region with a mask value of 0; otherwise, it is marked as a background region with a mask value of 1. This node attribute information is the core basis for the subsequent implementation of the foreground suppression strategy, as it directly determines which nodes should be retained and which should be masked during feature aggregation.
[0034] S4. Based on the node attribute information, determine the aggregation weight of each node in the graph structure when performing feature aggregation; wherein, the aggregation weight of the node belonging to the background region is greater than the aggregation weight of the node belonging to the foreground region.
[0035] In specific implementation, after obtaining the node attribute information, the aggregation weight of each node in the graph structure during feature aggregation is determined based on the node attribute information. The core technical concept of this step lies in constructing a differentiated weight allocation mechanism, specifically characterized by: the aggregation weight of nodes belonging to the background region being greater than the aggregation weight of nodes belonging to the foreground region. By significantly reducing or even setting the aggregation weight of foreground nodes to zero, it can be ensured that the feature information of foreground nodes will not contaminate the representation of background nodes in subsequent feature aggregation operations. This differentiated weight allocation is essentially a feature filtering strategy based on semantic prior, which enables the graph neural network to actively filter out features originating from interfering objects during message passing, thereby making the aggregated node features purer and more focused on the background region.
[0036] See Figure 5 In some preferred embodiments, determining the aggregation weight of each node in the graph structure during feature aggregation based on the node attribute information includes: S41, calculating the attention weight between any two adjacent nodes in the graph structure based on the graph structure; S42, correcting the attention weight according to the node attribute information by resetting the attention weight corresponding to the node belonging to the foreground region to zero, thereby obtaining the corrected attention weight; S43, determining the corrected attention weight as the aggregation weight.
[0037] In practice, determining the aggregation weights is a prerequisite for implementing differentiated feature aggregation. Its core lies in using node attribute information (i.e., foreground / background masks) to correct the initial attention weights, thereby cutting off the interference of foreground nodes on the feature aggregation process from the source. Unlike conventional Graph Attention Networks (GATs) that simply calculate attention weights based on node features, this embodiment directly incorporates node attribute information as a product factor into the calculation formula of the attention coefficients. This completely masks the contribution of foreground nodes in the aggregation process, ensuring that subsequent feature aggregation operations focus only on information from the background region. The specific implementation is as follows: First, based on the graph structure, the attention weight between any two adjacent nodes in the graph structure is calculated. The calculation of the attention weight adopts the multi-head attention mechanism in Graph Attention Networks (GAT). This mechanism allows the model to dynamically assign different weight coefficients to its neighboring nodes when processing each node, thereby adaptively focusing on neighboring features that are more relevant to the current node during the feature aggregation stage. For any pair of adjacent nodes in the graph structure, assuming the current node is i and one of its neighboring nodes is j, under the k-th attention head, the attention coefficient α... ij k The calculation formula is as follows: α ij k =(m j ·exp(LeakyReLU(a T [W k v i (l) ||W k v j (l) ]))) / (∑ u∈N(i) m u ·exp(LeakyReLU(a T [W k v i (l) ||W k v u (l) ]))).
[0038] The physical meaning and technical function of each symbol in the above formula are explained below: α ij k This represents the normalized attention weight of neighbor node j to the current node i under the k-th attention head. Its value range is [0,1]. For the same target node i, the sum of the attention coefficients of all its neighbor nodes is 1. This is achieved through the normalization operation of the denominator. m jm represents the binary mask value corresponding to node j. u This represents the binary mask value corresponding to the neighbor node u. The binary mask value is the aforementioned node attribute information, where the mask value corresponding to the node belonging to the background region is 1, and the mask value corresponding to the node belonging to the foreground region is 0. exp represents an exponential function with base e. LeakyReLU represents a modified linear unit activation function with leakage, which has a small gradient in the negative region, thus avoiding neuron death and maintaining the stability of gradient propagation. 'a' represents a learnable attention parameter vector, whose dimension can be set to, for example, 128. During training, this vector learns the correlation between nodes by performing a dot product operation with the transformed feature vector; T This represents the transpose of 'a', where the superscript T is the transpose operator; [·] represents a vector concatenation operation, which concatenates two feature vectors that have undergone linear transformation according to the channel dimension, thereby fusing the information of the two nodes into a joint feature representation; W k This represents the learnable feature transformation matrix of the k-th attention head, which linearly transforms the input features from the original dimension (e.g., 256 dimensions) to the target dimension (e.g., 64 dimensions), thereby achieving the mapping of the feature subspace. v i (l) v j (l) v u (l) Let represent the input feature vectors of node i, node j, and neighbor node u in the l-th layer graph attention network, respectively; where the superscript (l) indicates the layer number of the current graph attention network, and l=0 indicates the initial node features; N(i) represents the set of all neighboring nodes of node i in the graph structure; u represents any one of the neighboring nodes in the set N(i); ∑ u∈N(i) This indicates that the summation operation is performed on all neighboring nodes u of node i.
[0039] As can be seen from the above calculation formula, node attribute information (mask value) directly participates in the calculation of each term in the numerator and denominator in the form of a multiplier. Specifically, in the numerator, the mask value m of node j... j Multiply by the exponent; in the denominator, the mask value m for each neighbor node u. uIt is multiplied by its corresponding exponential term. The purpose of this design is that when a node is marked as a foreground region, its mask value is 0, and regardless of how similar it is to the features of the current node, its corresponding attention coefficient will automatically become 0. This is equivalent to forcibly reducing the contribution of foreground nodes to zero through mathematical operations before they participate in feature aggregation, thereby achieving precise blocking of foreground interference.
[0040] Furthermore, based on the node attribute information, the attention weights are corrected by resetting the attention weights of nodes belonging to the foreground region to zero, resulting in corrected attention weights. In fact, this correction operation is already performed synchronously during the calculation of the attention coefficients. Since the mask value of a foreground node is 0, its corresponding exponent term is set to zero, thus the attention weight of that node to the current node is automatically reset to zero. The mask value of a background node is 1, and its attention weight remains unchanged from its original calculated value.
[0041] Furthermore, the corrected attention weights are determined as the aggregation weights. At this point, each node has obtained weighted coefficients for all its background neighbor nodes, while the weights for all foreground neighbor nodes are all zero. This aggregation weight will serve as the input parameter for subsequent feature aggregation operations, controlling the contribution of different nodes in the weighted summation of features. Since the foreground nodes have been completely masked, the aggregation weight essentially represents the relative importance of the features of the background neighbor nodes to the current node.
[0042] This embodiment achieves precise masking of foreground nodes by directly embedding node attribute information (i.e., binary masks) as product factors into the attention coefficient calculation formula of the graph attention network. Compared to the conventional approach of treating all neighboring nodes equally in graph attention networks, this mechanism can block the propagation path of foreground features during the information propagation stage of feature aggregation. Furthermore, since the mask operation is fully differentiable, the mask value itself can be updated and fine-tuned through backpropagation during model training. This allows the model to adaptively optimize the boundary between foreground and background, overcoming potential detection errors in pre-trained detection models and further improving the accuracy and adaptability of background feature extraction.
[0043] S5. Based on the graph structure, the aggregation weights, and the initial node features, feature aggregation is performed on the initial node features to obtain aggregated node features.
[0044] In specific implementation, based on the graph structure, the aggregation weights, and the initial node features, feature aggregation is performed on the initial node features to obtain aggregated node features. The essence of feature aggregation is the message passing and feature fusion process between nodes in the graph structure. Specifically, using the topological connections provided by the graph structure as the message passing path and the aggregation weights as the intensity coefficients for information fusion, for each node in the graph structure, its own initial node features are weighted and summed with the initial node features of all its neighboring nodes. Furthermore, since the aggregation weights have been configured differentially, the feature contribution of foreground nodes is significantly reduced; therefore, the aggregated node features will mainly consist of visual information from the background region. The feature aggregation operation can be performed iteratively multiple times to enhance the receptive field, enabling node features to converge background information from a greater distance.
[0045] Further, the step of performing feature aggregation on the initial node features based on the graph structure, the aggregation weights, and the initial node features to obtain aggregated node features includes: performing a weighted summation on the initial node features based on the graph structure and the aggregation weights to obtain the aggregated node features.
[0046] In practice, feature aggregation is a core operation of graph neural networks. Its function is to fuse the features of a node with the features of its neighboring nodes, thereby expanding the receptive field and enhancing the expressive power of the features. After obtaining the aggregation weights determined in the aforementioned embodiments, this embodiment uses the graph structure and aggregation weights to perform a weighted summation operation on the initial node features to obtain the aggregated node features. The specific implementation method is as follows: First, based on the graph structure, the nodes requiring feature aggregation and their neighbor relationships are determined. The edge set in the graph structure defines the message passing paths between nodes. In a graph attention network, which neighbor nodes each node interacts with for features is entirely determined by the edge set established when constructing the graph structure. Therefore, the quality of the graph structure construction directly affects the topological basis for subsequent feature aggregation, while the accurate setting of edge weights affects the strength of the aggregation.
[0047] Further, based on the graph structure and the aggregation weights, the initial node features are weighted and summed. Specifically, for each node i in the graph structure, its own initial node features are weighted and fused with the initial node features of all neighboring nodes, and the weighting coefficient is the aggregation weight determined in the aforementioned embodiment 3A. Since the aggregation weights have been masked and the weights of foreground neighboring nodes are set to zero, only background neighboring nodes participate in the calculation during the actual weighted summation process. The output feature v of node i at layer l+1. i (l+1) The calculation formula is as follows: v i(l+1) =|| k=1 4 ReLU(∑ j ∈ N(i) α ij k W k v j (l) ).
[0048] The physical meaning and technical function of each symbol in the above formula are explained below: || k=1 4 This indicates a concatenation operation of the outputs of four independent attention heads, that is, concatenating the feature vectors calculated by each attention head along the channel dimension to form a richer, higher-dimensional feature representation. This multi-head design allows the model to capture complementary information from different feature subspaces; ReLU represents modified linear unit activation function, used to introduce non-linear transformations to enhance the model's expressive power; ∑ j ∈ N(i) This represents the summation operation performed on all neighboring nodes j of node i; α ij k The attention weights after masking correction, i.e., the aforementioned aggregation weights; W k v is the linear transformation matrix for the k-th attention head; j (l) Let be the input feature vector of neighbor node j in layer l. Since the attention weights of the masked foreground nodes are all zero, only the features of the background neighbor nodes are actually weighted and accumulated during the summation process, and the feature contributions of the foreground neighbor nodes are completely eliminated.
[0049] Furthermore, the physical meaning of this weighted summation is that the updated features of each node no longer rely solely on its own local information, but rather incorporate information from its surrounding background neighbor nodes, thereby expanding the local receptive field and enhancing feature robustness. After a complete feature aggregation operation, each node in the graph structure obtains updated features that contain structural information from its background neighborhood. Based on this, multiple iterative feature aggregation operations can be performed (e.g., stacking three GAT layers) to further expand the receptive field, enabling nodes to aggregate background information from greater distances.
[0050] Furthermore, after multiple feature aggregation operations, aggregated node features are obtained. These aggregated node features have eliminated foreground interference and incorporated information from the background region, and will serve as input data for the pre-trained encoder in subsequent steps.
[0051] This embodiment achieves local aggregation of background information by weighted summation of initial node features based on graph structure and aggregation weights. Since the aggregation weights have been corrected by foreground masks, the weighted summation operation can automatically filter out interference from the foreground region within the graph structure's topological framework, ensuring that the aggregated node features centrally reflect the inherent attributes of the background region. Furthermore, the application of a multi-head attention mechanism further enhances the model's diversity and expressive power in feature capture. This feature aggregation operation complements the subsequent global encoding: the graph network handles local denoising and background feature pre-aggregation, while the Transformer encoder handles global semantic fusion; together, they constitute a hierarchical architecture for extracting background features from indoor scenes.
[0052] S6, input the aggregated node features into the pre-trained encoder, and use the pre-trained encoder to perform global encoding on the aggregated node features to obtain the global background embedding.
[0053] In practice, after feature aggregation is completed, the aggregated node features are input into a pre-trained encoder. The pre-trained encoder then performs global encoding on the aggregated node features to obtain the global background embedding. The pre-trained encoder can be a Transformer-based encoder model, such as ViT-Small, which includes components such as multi-head self-attention mechanisms, feedforward neural networks, layer normalization, and residual connections. Since the aggregated node features still exist in the form of a graph structure, and Transformer encoders typically require an ordered sequence as input, the aggregated node features need to be serialized first. This involves arranging the node features into an ordered sequence according to the spatial position of the image patch corresponding to the node in the original image (e.g., row priority from left to right and top to bottom). After the serialized features are input into the Transformer encoder, the multi-head self-attention mechanism in the encoder enables the features at each position in the sequence to simultaneously pay attention to the features at all other positions in the sequence during computation. This achieves global contextual information interaction across the graph topology, ultimately generating a compact embedding vector that integrates the semantic information of the entire graph background, i.e., the global background embedding.
[0054] See Figure 6In some preferred embodiments, the aggregated node features are input into a pre-trained encoder, and the aggregated node features are globally encoded using the pre-trained encoder to obtain a global background embedding, including: S61, serializing the aggregated node features and inputting the serialized aggregated node features into the pre-trained encoder; S62, in the pre-trained encoder, global context feature fusion is performed on the serialized aggregated node features to obtain a global context modeling result; S63, the global context modeling result is mapped to a global embedding space of a preset dimension to obtain the global background embedding.
[0055] In practice, the pre-trained encoder is responsible for integrating discrete graph node features into a background embedding vector for the entire image. It is a crucial link connecting the local aggregation and global scene representation of the graph neural network. The Transformer encoder, due to its powerful global perception capabilities, has been widely used in computer vision. This embodiment introduces it into indoor scene background feature extraction, complementing the graph network. The specific implementation is as follows: First, the aggregated node features are serialized. Since nodes in a graph structure are inherently unordered, and the encoder in the Transformer architecture requires ordered sequences as input to perceive positional relationships between elements through positional encoding, the aggregated node features need to be converted into an ordered feature sequence according to a preset arrangement rule. Specifically, based on the spatial position of the image patch corresponding to each node in the original image (e.g., row-major order from left to right and top to bottom), the node features are arranged sequentially to form a fixed-length feature sequence.
[0056] Further, the serialized node features are input into the pre-trained encoder. The pre-trained encoder is implemented based on the Transformer architecture, such as the ViT-Small model, whose core components include a multi-head self-attention mechanism, a multilayer perceptron module, layer normalization, and residual connections. In the pre-trained encoder, global contextual feature fusion is performed on the serialized node features. Specifically, the core of the Transformer encoder is the multi-head self-attention mechanism. Through this mechanism, the features at each position in the sequence can simultaneously focus on the features at all other positions in the sequence during computation, thereby breaking the original local topological constraints of the graph structure and achieving global information interaction of all node features. This cross-position global attention computation enables the encoder to capture the connections between distant nodes, even if these nodes do not have direct edge connections in the graph structure.
[0057] After being processed by stacking multiple Transformer blocks, the features of each node in the sequence are continuously aggregated and refined, and finally a global context modeling result containing the semantic information of the entire image background is output.
[0058] Furthermore, the global context modeling result is mapped to a global embedding space of a preset dimension to obtain the global background embedding. This mapping operation is implemented by the fully connected layer (or classification head) at the end of the Transformer encoder, which projects the globally fused high-dimensional features to the target embedding dimension (e.g., 128 dimensions) through a linear transformation, thereby obtaining a compact, fixed-length global background embedding vector. This vector is a complete abstract representation of the background information of the entire image and can be directly used for subsequent clustering tasks.
[0059] This embodiment uses serialization to arrange graph node features in an ordered manner, which is then used as input to the Transformer encoder, fully leveraging the Transformer's advantages in capturing global context and long-range dependencies. Compared to methods that rely solely on graph neural networks for feature aggregation, using Transformer for global encoding integrates scattered background information across the entire image, giving the final global background embedding a richer global contextual awareness, thus significantly improving the ability of subsequent clustering tasks to distinguish complex indoor scenes. Furthermore, this hierarchical feature extraction chain of "local first, then global"—that is, first using graph neural networks to perform feature aggregation and foreground suppression in local regions, and then using Transformer to perform semantic integration across the entire image—ensures that background features retain both fine local details and complete global cognition, providing high-quality embedding input for unsupervised scene clustering.
[0060] In some preferred embodiments, the pre-trained encoder is trained as follows: random cropping and color jittering are applied to a sample indoor scene image to generate a background-enhanced view corresponding to the sample indoor scene image; the foreground region in the sample indoor scene image is removed, and the region after removing the foreground region is filled with the average background color to generate a pure background view corresponding to the sample indoor scene image; the background-enhanced view is input into the encoder to obtain a first embedding vector, and the pure background view is input into the encoder to obtain a second embedding vector; the first embedding vector and the second embedding vector are used to construct a positive sample pair; other sample indoor scene images besides the sample indoor scene image are selected from a pre-acquired batch of samples; the embedding vectors corresponding to each of the other sample indoor scene images are extracted, and the embedding vectors corresponding to each of the other sample indoor scene images are used to construct a negative sample pair; a contrastive learning loss function is constructed based on the positive sample pair and the negative sample pair to minimize the distance between the positive sample pairs and maximize the distance between the positive sample pairs and the negative sample pairs; the network parameters of the encoder are updated according to the contrastive learning loss function to obtain the pre-trained encoder.
[0061] In specific implementation, the pre-trained encoder aims to use a contrastive learning strategy to make the global embedding vector output by the encoder inherently robust and invariant to dynamic foreground changes in the scene. Therefore, during the inference stage of practical applications, regardless of whether there are interfering factors such as people walking or objects moving in the target indoor scene image, the encoder can stably output feature vectors representing the inherent background attributes of the scene. The core idea of contrastive learning used in this embodiment is to shorten the distance between positive sample pairs (i.e., samples with the same semantic background) in the embedding space, while simultaneously widening the distance between negative sample pairs (i.e., samples with different semantic backgrounds), thereby learning feature representations with high discriminative power. The specific implementation method is as follows: First, a set of sample indoor scene images is obtained as the training dataset, which is derived from unlabeled indoor surveillance video streams or static image libraries. For each sample indoor scene image in the training set, random cropping and color dithering are applied to generate a background-enhanced view corresponding to the sample indoor scene image. Random cropping involves randomly selecting a rectangular sub-region from the original image and scaling it to the same size as the original image. The cropping ratio can be set to [0.6, 1.0], aiming to enable the model to pay attention to the background texture of different local areas in the image and improve the model's invariance to spatial transformations. Color dithering involves randomly fine-tuning the brightness, contrast, saturation, and hue of the image. For example, the adjustment range for brightness and contrast is set within ±0.2 to simulate the image color shift caused by fluctuations in light intensity, changes in light source color temperature, and differences in camera sensor parameters in a real indoor surveillance environment, thereby enhancing the model's adaptability to changes in lighting. The synergistic effect of these two data augmentation operations can significantly expand the diversity of training samples based on a limited number of training samples.
[0062] Furthermore, a pre-trained object detection model (e.g., YOLOv3) is used to accurately locate and segment the foreground regions (such as people, animals, and temporarily placed objects) in the sample indoor scene image. The specific process is as follows: First, the object detection model identifies the bounding boxes of all foreground objects in the image; then, a corresponding binary mask is generated based on these bounding boxes. The pixel values within the foreground region covered by the mask are replaced with the statistical average of the pixel values of the remaining background regions of the original image (i.e., the average background color), thereby generating a pure background view corresponding to the sample indoor scene image. This pure background view does not contain any dynamic foreground objects, but only retains fixed indoor background texture and physical structure information, serving as an ideal reference benchmark sample for the encoder to learn background consistency, i.e., an "anchor" positive sample in contrastive learning.
[0063] Furthermore, the enhanced background view is input into the encoder to be trained (e.g., a Transformer model with a ViT-Small architecture) for forward inference to obtain the first embedding vector z. i Simultaneously, the pure background view is input into the same encoder to obtain the second embedding vector z. i,b Since both the enhanced background view and the plain background view originate from the same original indoor scene, they should be completely identical in terms of background semantic content. The only difference lies in the presence state of the foreground objects. Based on this, the first embedding vector z is... i With the second embedding vector z i,bThese are constructed as positive sample pairs. The purpose of positive sample pairs is to force the encoder to map two semantically identical but slightly different views to similar positions in the embedding space, thereby forcing the encoder to learn the ability to ignore foreground changes.
[0064] Furthermore, in constructing negative sample pairs, a global comparison strategy based on cross-samples within a batch is adopted. Specifically, from the pre-acquired sample set of the same batch, other sample indoor scene images besides the sample indoor scene image are selected as negative sample sources. For the B samples contained in the current training batch, the current anchor point sample is defined as the i-th sample, and its corresponding background enhancement view embedding is z. i When constructing the negative sample set, it iterates through all other samples within the batch that satisfy the condition k≠i. For each other sample k, it extracts not only the embedding vector z corresponding to its background augmentation view. k It also extracts the embedding vector z corresponding to its pure background view. k,b Both are used as anchor points to embed z i The negative samples. That is, for anchor point z i In other words, its negative sample set N i It is defined as the embedding vector of all 2(B-1) other views in the batch, excluding its own view. This extended negative sample construction strategy can significantly enrich the diversity of negative samples, enabling the model to not only learn the distinction boundary between different scenes in a single iteration, but also enhance the model's ability to distinguish different augmented views in the same scene, effectively preventing the model from getting trapped in local optima too early due to a single negative sample.
[0065] Furthermore, based on the constructed positive and negative sample pairs, a contrastive learning loss function is built to optimize the encoder's network parameters. Specifically, the contrastive learning loss function adopts the improved NT-Xent loss function, whose mathematical expression is: L=-(1 / B)∑ i=1 B log(exp(sim(z i ,z i,b ) / τ) / (∑ k=1 B 1 k≠i exp(sim(z i ,z k ) / τ))).
[0066] The physical meaning and technical function of each symbol in the above formula are explained below: B represents the total number of samples contained in the current training batch; z i z represents the anchor embedding vector output by the encoder for the background augmentation view of the i-th sample; i,bz represents the positive sample embedding vector output by the encoder for the pure background view corresponding to the i-th sample; k This represents the embedding vector of the kth other sample within the same batch (the z-vector). k In the unified representation of this loss function, the term "negative sample set" refers to the set of negative samples, including the aforementioned N. i (All vectors in the vectors); τ represents the temperature coefficient, which can be set to 0.07 in this embodiment. The role of the temperature coefficient is to control the sensitivity of the contrast loss to the distribution of negative samples. A smaller temperature coefficient will make the model pay more attention to those "hard negative samples" that are highly similar to the anchor point; 1 k ≠ i The indicator function takes a value of 1 when k ≠ i and 0 otherwise. Its purpose is to ensure that the similarity term of the anchor point itself is effectively excluded during the summation of the denominator, preventing model collapse. The similarity function sim(u,v) uses cosine similarity, and its calculation formula is: sim(u,v) = (u T v) / (||u|| · ||v||).
[0067] Furthermore, the optimization objective of this loss function is very clear: in the embedding space, maximize the proximity of positive sample pairs (i.e., augmented view embeddings z of the same scene). i Embedded with plain background view z i,b The distance between the samples is minimized, while maximizing the distance from the negative sample set. By minimizing the above loss function using the gradient descent algorithm, the network parameters of the encoder are updated through backpropagation. After a large number of iterations of training, the encoder parameters will gradually converge, thereby learning the feature representation ability to ignore foreground changes and accurately capture the inherent attributes of the background.
[0068] This embodiment innovatively adopts a contrastive learning strategy using a pure background view as the anchor point, making "foreground invariance" the core learning objective of the encoder. In positive sample pairs, the pure background view completely removes foreground interference, while the background-enhanced view fully preserves the foreground. This forced convergence of heterogeneous views compels the encoder to treat foreground changes as "noise" rather than "discriminative features" during processing, thus achieving semantic masking of the foreground. Furthermore, an in-batch global negative sample construction scheme is employed, comparing each anchor point with all other samples' enhanced and pure background views within the same batch. This greatly enriches the diversity of negative samples and improves the discriminative efficiency of contrastive learning. The pre-trained encoder obtained through this embodiment can stably output a global background embedding vector that is strongly correlated with the inherent background of the scene and weakly correlated with dynamic foreground changes during the inference phase. This fundamentally solves the problem of blurred cluster boundaries caused by foreground contamination in traditional methods, significantly improving the resolution and accuracy of subsequent unsupervised scene clustering tasks.
[0069] S7, cluster the global background embedding to obtain the background clustering result of the target indoor scene image.
[0070] In specific implementation, the global background embedding is clustered to obtain the background clustering results of the target indoor scene image. The clustering operation uses the distance between the global background embedding and the high-dimensional embedding space (e.g., Euclidean distance) as the metric, and an unsupervised clustering algorithm (e.g., k-means algorithm) is used to divide the embedding vectors corresponding to different images into several clusters. Furthermore, since the global background embedding has undergone contrastive learning training and foreground suppression processing, it has good invariance to dynamic foreground changes. Therefore, the clustering results can truly reflect the inherent categories of indoor scenes (e.g., offices, classrooms, corridors, conference rooms, laboratories, etc.), realizing automatic scene classification and recognition under unsupervised conditions.
[0071] This embodiment forms a complete processing chain from image input to background scene segmentation by extracting initial node features in blocks, constructing a bimodal graph structure, using node attribute information to differentially allocate aggregation weights to actively suppress foreground interference, and finally obtaining global background embeddings through Transformer encoder encoding and clustering. Furthermore, because background nodes are given dominant aggregation weights during the feature aggregation stage, the impact of foreground changes on the final embedding is effectively suppressed, enabling the clustering results to truly reflect the inherent categories of the background scene. Furthermore, the combined architecture of graph neural network and Transformer encoder retains the ability to model local spatial semantics of the image while also taking into account the ability to capture global contextual information, significantly improving the discriminative power of background features under different scenes and solving the technical problem of inaccurate background feature extraction under dynamic foreground interference in existing technologies.
[0072] In some preferred embodiments, the step of clustering the global background embedding to obtain the background clustering result of the target indoor scene image includes: determining initial cluster centers using the distance of the global background embedding in the high-dimensional embedding space as a metric; taking the initial cluster centers as the current cluster centers and performing an iterative operation; the iterative operation includes: in each iteration, calculating the distance between the global background embedding and each of the current cluster centers, dividing the global background embedding into the cluster corresponding to the current cluster center with the smallest distance, and recalculating the coordinates of each of the current cluster centers based on the divided clusters; repeating the iterative operation until the change in the coordinates of the current cluster centers between two adjacent iterations is less than a preset change threshold, obtaining a final cluster that meets the convergence condition; and determining the category corresponding to the final cluster as the background clustering result.
[0073] In practice, the purpose of clustering is to automatically classify different indoor scenes into different categories under unsupervised conditions, thereby achieving automatic organization and classification of a large number of unlabeled indoor scene images. The choice of clustering algorithm and parameter settings have a significant impact on the accuracy of the final clustering results. This embodiment uses the k-means algorithm because of its high computational efficiency, ease of implementation, and good performance when processing medium-sized datasets. The specific implementation method is as follows: First, the initial cluster centers are determined using the distance between the global background embeddings and the high-dimensional embedding space as a metric. The distance metric typically uses Euclidean distance to measure the spatial spacing between embedding vectors; closer distances indicate greater similarity in background features between two scenes. The initial cluster centers can be determined randomly by selecting a specified number of embeddings from all global background embeddings. Alternatively, a k-means++ heuristic strategy can be used, which iteratively selects embeddings farther from the currently selected centers as new centers. This ensures high coverage of the initial cluster centers in the data distribution space, reduces the possibility of the algorithm getting trapped in local optima, and improves the stability of the clustering results.
[0074] Further, the initial cluster centers are used as the current cluster centers, and an iterative operation is performed. The specific process of the iterative operation is as follows: In the current iteration step, the Euclidean distance between each global background embedding and each current cluster center is calculated, and each global background embedding is assigned to the cluster corresponding to the current cluster center with the smallest distance according to the nearest distance criterion. After the assignment is completed, the coordinates of each current cluster center are recalculated based on the geometric mean (i.e., the average value of the coordinates) of all global background embeddings contained in each cluster. The above operation constitutes a complete iterative update process, the purpose of which is to make the cluster centers continuously approach the true center position of their respective clusters.
[0075] Furthermore, the above iterative operation is repeated until the change in coordinates of the current cluster center between two adjacent iterations is less than a preset change threshold. The preset change threshold is a standard for determining whether clustering has reached a stable state; for example, it can be set to 1e-5, meaning that when the movement distance of all cluster centers in two iterations is less than this threshold, the clustering result is considered converged, and the algorithm stops iterating. This convergence condition ensures the stability and reliability of the clustering results, avoiding the waste of computational resources due to infinite iteration.
[0076] Furthermore, once the convergence condition is met, the iteration operation stops, and the final clusters that satisfy the convergence condition are output. Each final cluster corresponds to a specific indoor scene category, and the embedding vectors within the clusters share similar background features.
[0077] Furthermore, the category corresponding to the final cluster is determined as the background clustering result. For each target indoor scene image, the category label of the indoor scene can be determined based on the cluster to which its global background is embedded after convergence.
[0078] This embodiment uses the k-means clustering algorithm to group the global background embedding, automatically identifying different categories of indoor scenes without manual annotation. Since the input global background embedding has been optimized through contrastive learning, it exhibits excellent invariance to changes in movement and lighting within the scene. Therefore, the clustering results primarily reflect the differences between inherent backgrounds, accurately separating different types of indoor spaces (such as offices, corridors, meeting rooms, and classrooms). Furthermore, compared to supervised classification methods that require a large number of labeled samples for training, the clustering scheme in this embodiment has high practicality and scalability, making it suitable for the automated processing and analysis of large-scale indoor scene data.
[0079] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0080] This invention can be applied to the fields of fintech and healthcare, with specific application examples as follows: In the fintech field, this technical solution can be deployed in intelligent security analysis systems for bank branches. Branches experience dynamic foreground interference from continuously moving customers and employees, making it difficult for traditional methods to reliably extract background semantic features corresponding to fixed facilities such as ATMs, service windows, and waiting areas. When applying this method, after security cameras capture images of the branch, initial node features for each image block are obtained through block processing and feature extraction. A graph structure representing the relationships between different areas within the branch is constructed based on spatial location and feature similarity. After obtaining the attribute information corresponding to each node, areas of human activity are marked as foreground, and areas of fixed facilities are marked as background. Aggregation weights are determined based on this attribute information, making the weight of nodes belonging to the background area higher than that of foreground nodes. This actively suppresses the contribution of foreground nodes during feature aggregation, resulting in aggregated node features focused on the inherent physical layout of the branch. These features are then globally encoded by a pre-trained encoder to generate a global background embedding that excludes human interference. This embedding accurately reflects the distribution pattern of the fixed spatial structure within the branch. Ultimately, through clustering, the system can directly output clustering results for different background areas within the branch, such as dividing the business environment into different background categories like "areas mainly composed of self-service equipment" and "areas mainly composed of manual counters." This result is independent of changes in personnel distribution and can maintain an accurate reflection of the branch's physical spatial layout during peak business hours, thus providing a stable background baseline reference for identifying abnormal area occupancy or changes in equipment status.
[0081] In the healthcare field, this technical solution can be applied to intelligent care systems in hospital intensive care units or general wards. Frequent entry and exit of medical staff and irregular changes in patient posture significantly interfere with the modeling of the ward's inherent environment. When applying this method, the ward image to be tested is first segmented, and the initial node features of each image block are extracted. A graph structure representing the relationships between fixed structures such as beds, medical monitors, doors, and windows within the ward is constructed based on spatial location and feature similarity. Subsequently, the attribute information of each node in the graph structure is obtained, marking the areas where medical staff and patients are located as foreground and the fixed equipment and building structures as background. Based on this attribute information, an aggregation weight is determined, making the weight of background nodes greater than that of foreground nodes. This actively suppresses the feature contribution of foreground nodes during feature aggregation, resulting in aggregated node features focused on the inherent layout of the ward's environment. This feature, after global encoding by a pre-trained encoder, generates a global background embedding that accurately reflects the basic spatial structure of the ward and is unaffected by personnel activity. Ultimately, through clustering, the system can stably output background clustering results for different ward scenarios, such as distinguishing between "standard layout under normal monitoring conditions" and "altered layouts after equipment movement or bed adjustments." These clustering results can serve subsequent tasks such as bed occupancy detection and abnormal equipment location warnings, providing a stable environmental situation reference for intelligent care.
[0082] In one embodiment, a background clustering device for indoor scene images is provided, which corresponds one-to-one with the background clustering method for indoor scene images described in the above embodiments. For example... Figure 7 As shown, the background clustering device for the indoor scene image includes: The segmentation unit is used to segment the target indoor scene image into multiple image blocks in response to receiving the target indoor scene image, and to extract the initial node features corresponding to each image block. The construction unit is used to construct a graph structure representing the relationship between the image blocks based on the initial node features and the spatial location corresponding to each image block; The acquisition unit is used to acquire node attribute information corresponding to each node in the graph structure, wherein the node attribute information is used to indicate whether the region to which the node belongs is a foreground region or a background region. The determining unit is used to determine the aggregation weight of each node in the graph structure when performing feature aggregation based on the node attribute information; wherein the aggregation weight of the node belonging to the background region is greater than the aggregation weight of the node belonging to the foreground region. An aggregation unit is used to perform feature aggregation on the initial node features based on the graph structure, the aggregation weights, and the initial node features to obtain aggregated node features; An encoding unit is used to input the aggregated node features into a pre-trained encoder, and use the pre-trained encoder to perform global encoding on the aggregated node features to obtain a global background embedding. The clustering unit is used to cluster the global background embedding to obtain the background clustering result of the target indoor scene image.
[0083] In some preferred embodiments, the graph structure includes multiple nodes, each node corresponding one-to-one with a plurality of image patches, and the initial node feature corresponding to each node is the initial node feature of the image patch corresponding to that node; the step of constructing a graph structure representing the association relationship between the image patches based on the initial node features and the spatial location corresponding to each image patch includes: For any two nodes in the graph structure, the center distance between the two nodes is calculated based on the spatial coordinates of the image patches corresponding to the two nodes, and the feature similarity between the two nodes is calculated based on the initial node features corresponding to the two nodes. When the center distance is less than or equal to a preset spatial adjacency threshold, a spatial adjacency edge is established between the two nodes; When the feature similarity is greater than a preset semantic similarity threshold, a semantic similarity edge is established between the two nodes; Based on the splicing results of the initial node features corresponding to the two nodes and the spatial coordinate offset between the image blocks corresponding to the two nodes, the initial edge weights of the spatial adjacent edge and the semantically similar edge are calculated, and the initial edge weights are normalized to obtain the normalized edge weights. The graph structure is constructed based on the spatial adjacent edges, the semantically similar edges, and the normalized edge weights.
[0084] In some preferred embodiments, determining the aggregation weight of each node in the graph structure during feature aggregation based on the node attribute information includes: Based on the graph structure, calculate the attention weight between any two adjacent nodes in the graph structure; Based on the node attribute information, the attention weights are corrected by resetting the attention weights of nodes belonging to the foreground region to zero, thus obtaining the corrected attention weights. The modified attention weight is determined as the aggregation weight; The step of performing feature aggregation on the initial node features based on the graph structure, the aggregation weights, and the initial node features to obtain aggregated node features includes: Based on the graph structure and the aggregation weights, the initial node features are weighted and summed to obtain the aggregated node features.
[0085] In some preferred embodiments, the pre-trained encoder is trained in the following manner: Random cropping and color dithering are applied to the sample indoor scene image to generate a background-enhanced view corresponding to the sample indoor scene image; Remove the foreground region from the sample indoor scene image, and fill the region after removing the foreground region with the average background color to generate a pure background view corresponding to the sample indoor scene image; The background-enhanced view is input into the encoder to obtain a first embedding vector, and the plain background view is input into the encoder to obtain a second embedding vector; The first embedding vector and the second embedding vector are used to construct a positive sample pair; From the same batch of samples obtained in advance, select other sample indoor scene images besides the sample indoor scene image; extract the embedding vectors corresponding to each of the other sample indoor scene images, and construct negative sample pairs from the embedding vectors corresponding to each of the other sample indoor scene images; A contrastive learning loss function is constructed based on the positive sample pairs and the negative sample pairs to minimize the distance between the positive sample pairs and maximize the distance between the positive sample pairs and the negative sample pairs. The network parameters of the encoder are updated according to the contrastive learning loss function to obtain the pre-trained encoder.
[0086] In some preferred embodiments, the step of clustering the global background embedding to obtain the background clustering result of the target indoor scene image includes: The initial cluster centers are determined by using the distance between the global background embedding in the high-dimensional embedding space as a metric. The initial cluster center is used as the current cluster center, and an iterative operation is performed. The iterative operation includes: in each iteration, calculating the distance between the global background embedding and each of the current cluster centers, dividing the global background embedding into the cluster corresponding to the current cluster center with the smallest distance, and recalculating the coordinates of each of the current cluster centers based on the divided clusters. Repeat the iterative operation until the change in coordinates of the current cluster center between two adjacent iterations is less than a preset change threshold, and obtain the final cluster that meets the convergence condition; The category corresponding to the final cluster is determined as the background clustering result.
[0087] In some preferred embodiments, the step of segmenting the target indoor scene image into multiple image blocks and extracting the initial node features corresponding to each image block includes: The target indoor scene image is divided into multiple non-overlapping image blocks of equal size; The features of each non-overlapping image block are extracted using a feature extraction network to obtain a feature vector of a preset dimension corresponding to each non-overlapping image block; The feature vector of the preset dimension corresponding to each non-overlapping image block is determined as the initial node feature.
[0088] In some preferred embodiments, the step of inputting the aggregated node features into a pre-trained encoder and using the pre-trained encoder to perform global encoding on the aggregated node features to obtain a global background embedding includes: The aggregated node features are serialized, and the serialized aggregated node features are input into the pre-trained encoder. In the pre-trained encoder, global context features are fused on the serialized and aggregated node features to obtain global context modeling results; The global context modeling result is mapped to a global embedding space of a preset dimension to obtain the global background embedding.
[0089] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When executed by the processor, the computer program implements the server-side functions or steps of a background clustering method for indoor scene images.
[0090] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 9As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements client-side functions or steps of a background clustering method for indoor scene images.
[0091] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a background clustering method for indoor scene images provided in any of the above embodiments.
[0092] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of a background clustering method for indoor scene images provided in any of the above embodiments.
[0093] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0094] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0095] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0096] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application is authorized (with the knowledge and consent) by the relevant parties or fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.
[0097] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A background clustering method for indoor scene images, characterized in that, include: In response to receiving a target indoor scene image, the target indoor scene image is divided into blocks to obtain multiple image blocks, and the initial node features corresponding to each image block are extracted; Based on the initial node features and the spatial location corresponding to each image block, a graph structure representing the relationship between the image blocks is constructed; Obtain the node attribute information corresponding to each node in the graph structure. The node attribute information is used to indicate whether the region to which the node belongs is a foreground region or a background region. Based on the node attribute information, the aggregation weight of each node in the graph structure is determined during feature aggregation; wherein, the aggregation weight of nodes belonging to the background region is greater than the aggregation weight of nodes belonging to the foreground region. Based on the graph structure, the aggregation weights, and the initial node features, feature aggregation is performed on the initial node features to obtain aggregated node features; The aggregated node features are input into a pre-trained encoder, and the pre-trained encoder is used to globally encode the aggregated node features to obtain a global background embedding. Clustering is performed on the global background embedding to obtain the background clustering result of the target indoor scene image.
2. The background clustering method for indoor scene images according to claim 1, characterized in that, The graph structure includes multiple nodes, each node corresponding to one of the multiple image blocks, and the initial node feature of each node is the initial node feature of the image block corresponding to that node. The step of constructing a graph structure representing the relationships between the image patches based on the initial node features and the spatial location corresponding to each image patch includes: For any two nodes in the graph structure, the center distance between the two nodes is calculated based on the spatial coordinates of the image patches corresponding to the two nodes, and the feature similarity between the two nodes is calculated based on the initial node features corresponding to the two nodes. When the center distance is less than or equal to a preset spatial adjacency threshold, a spatial adjacency edge is established between the two nodes; When the feature similarity is greater than a preset semantic similarity threshold, a semantic similarity edge is established between the two nodes; Based on the splicing results of the initial node features corresponding to the two nodes and the spatial coordinate offset between the image blocks corresponding to the two nodes, the initial edge weights of the spatial adjacent edge and the semantically similar edge are calculated, and the initial edge weights are normalized to obtain the normalized edge weights. The graph structure is constructed based on the spatial adjacent edges, the semantically similar edges, and the normalized edge weights.
3. The background clustering method for indoor scene images according to claim 1, characterized in that, The step of determining the aggregation weight of each node in the graph structure during feature aggregation based on the node attribute information includes: Based on the graph structure, calculate the attention weight between any two adjacent nodes in the graph structure; Based on the node attribute information, the attention weights are corrected by resetting the attention weights of nodes belonging to the foreground region to zero, thus obtaining the corrected attention weights. The modified attention weight is determined as the aggregation weight; The step of performing feature aggregation on the initial node features based on the graph structure, the aggregation weights, and the initial node features to obtain aggregated node features includes: Based on the graph structure and the aggregation weights, the initial node features are weighted and summed to obtain the aggregated node features.
4. The background clustering method for indoor scene images according to claim 1, characterized in that, The pre-trained encoder is trained in the following way: Random cropping and color dithering are applied to the sample indoor scene image to generate a background-enhanced view corresponding to the sample indoor scene image; Remove the foreground region from the sample indoor scene image, and fill the region after removing the foreground region with the average background color to generate a pure background view corresponding to the sample indoor scene image; The background-enhanced view is input into the encoder to obtain a first embedding vector, and the plain background view is input into the encoder to obtain a second embedding vector; The first embedding vector and the second embedding vector are used to construct a positive sample pair; From the same batch of samples obtained in advance, select other sample indoor scene images besides the sample indoor scene image; extract the embedding vectors corresponding to each of the other sample indoor scene images, and construct negative sample pairs from the embedding vectors corresponding to each of the other sample indoor scene images; A contrastive learning loss function is constructed based on the positive sample pairs and the negative sample pairs to minimize the distance between the positive sample pairs and maximize the distance between the positive sample pairs and the negative sample pairs. The network parameters of the encoder are updated according to the contrastive learning loss function to obtain the pre-trained encoder.
5. The background clustering method for indoor scene images according to claim 1, characterized in that, The step of clustering the global background embedding to obtain the background clustering result of the target indoor scene image includes: The initial cluster centers are determined by using the distance between the global background embedding and the high-dimensional embedding space as a metric. The initial cluster center is used as the current cluster center, and an iterative operation is performed. The iterative operation includes: in each iteration, calculating the distance between the global background embedding and each of the current cluster centers, dividing the global background embedding into the cluster corresponding to the current cluster center with the smallest distance, and recalculating the coordinates of each of the current cluster centers based on the divided clusters. Repeat the iterative operation until the change in coordinates of the current cluster center between two adjacent iterations is less than a preset change threshold, and obtain the final cluster that meets the convergence condition; The category corresponding to the final cluster is determined as the background clustering result.
6. The background clustering method for indoor scene images according to claim 1, characterized in that, The step of segmenting the target indoor scene image into multiple image blocks and extracting the initial node features corresponding to each image block includes: The target indoor scene image is divided into multiple non-overlapping image blocks of equal size; The features of each non-overlapping image block are extracted using a feature extraction network to obtain a feature vector of a preset dimension corresponding to each non-overlapping image block; The feature vector of the preset dimension corresponding to each non-overlapping image block is determined as the initial node feature.
7. The background clustering method for indoor scene images according to claim 1, characterized in that, The step of inputting the aggregated node features into a pre-trained encoder and using the pre-trained encoder to perform global encoding on the aggregated node features to obtain a global background embedding includes: The aggregated node features are serialized, and the serialized aggregated node features are input into the pre-trained encoder. In the pre-trained encoder, global context features are fused on the serialized and aggregated node features to obtain global context modeling results; The global context modeling result is mapped to a global embedding space of a preset dimension to obtain the global background embedding.
8. A background clustering device for indoor scene images, characterized in that, include: The segmentation unit is used to segment the target indoor scene image into multiple image blocks in response to receiving the target indoor scene image, and to extract the initial node features corresponding to each image block. The construction unit is used to construct a graph structure representing the relationship between the image blocks based on the initial node features and the spatial location corresponding to each image block; The acquisition unit is used to acquire node attribute information corresponding to each node in the graph structure, wherein the node attribute information is used to indicate whether the region to which the node belongs is a foreground region or a background region. The determining unit is used to determine the aggregation weight of each node in the graph structure when performing feature aggregation based on the node attribute information; wherein the aggregation weight of the node belonging to the background region is greater than the aggregation weight of the node belonging to the foreground region. An aggregation unit is used to perform feature aggregation on the initial node features based on the graph structure, the aggregation weights, and the initial node features to obtain aggregated node features; An encoding unit is used to input the aggregated node features into a pre-trained encoder, and use the pre-trained encoder to perform global encoding on the aggregated node features to obtain a global background embedding. The clustering unit is used to cluster the global background embedding to obtain the background clustering result of the target indoor scene image.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the background clustering method for indoor scene images as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the background clustering method for indoor scene images as described in any one of claims 1 to 7.
