How room and tool relate to spread in staging drift

2026-12-06来源 dev.toEnglish

A virtual staging tool can preserve the architecture in one photo and move it visibly in another. Drift measures that movement, with lower scores indicating less measured movement. Across 129 completed runs from StagingBench, an independent benchmark of AI virtual staging tools, differences between room averages accounted for 16.93 percent of the spread in drift when rooms were considered alone. Differences between tool averages accounted for 18.10 percent when tools were considered alone.

Start with the spread across runs

The grand mean gives every completed run equal weight. Subtract that mean from each drift score, square the difference, and add the results. That gives the total sum of squares. Squaring keeps positive and negative differences from canceling and gives larger departures from the mean more weight. The same total serves as the denominator for each share below.

For the room calculation, group the scores by room and find each room’s mean. Measure how far that mean sits from the grand mean, square the difference, and multiply by the number of completed runs for the room. Adding those weighted distances gives the between-room sum of squares. The tool calculation follows the same steps, grouping the scores by tool instead.

A room mean captures the average across the tools that completed that photo. The highest room mean was 34.9231 in room 04. The lowest was 12.3154 in room 09. Those means describe the scores across completed runs for each room. Individual runs can sit on either side of their room mean, and that variation remains in the total against which the room share is measured.

Fit room and tool together

The two shares are separate one-factor summaries. The separate fits can pick up overlapping variation, so the shares cannot be added to measure what room and tool explain together. The test is slightly unbalanced. One run was refused, leaving room 08 with 12 completed runs and every other room with 13. That missing combination changes how the room and tool averages relate to each other.

The joint fit predicts each score by adding a room level and a tool effect. It starts with all tool effects set to zero. It then averages the scores within each room after subtracting the current tool effects. With those room levels in place, it updates each tool effect by averaging what remains for that tool. It repeats these updates until the effects settle. The remaining spread comes from the squared gaps between the observed scores and the joint predictions.

from collections import defaultdict from statistics import mean rows = [ ('T01', '01', 16.2), ('T01', '02', 32.9), ('T01', '03', 9.2), ('T01', '04', 40.1), ('T01', '05', 13.7), ('T01', '06', 43.4), ('T01', '07', 41.0), ('T01', '08', 11.6), ('T01', '09', 13.1), ('T01', '10', 22.7), ('T02', '01', 11.0), ('T02', '02', 24.1), ('T02', '03', 21.7), ('T02', '04', 56.5), ('T02', '05', 21.4), ('T02', '06', 26.2), ('T02', '07', 35.1), ('T02', '08', 17.4), ('T02', '09', 9.2), ('T02', '10', 28.0), ('T03', '01', 28.2), ('T03', '02', 30.6), ('T03', '03', 29.7), ('T03', '04', 29.0), ('T03', '05', 15.5), ('T03', '06', 21.1), ('T03', '07', 18.0), ('T03', '08', 12.6), ('T03', '09', 14.9), ('T03', '10', 20.2), ('T04', '01', 27.1), ('T04', '02', 26.6), ('T04', '03', 33.5), ('T04', '04', 28.8), ('T04', '05', 22.5), ('T04', '06', 21.3), ('T04', '07', 24.4), ('T04', '08', 23.5), ('T04', '09', 26.9), ('T04', '10', 26.6), ('T05', '01', 29.4), ('T05', '02', 6.1), ('T05', '03', 23.6), ('T05', '04', 61.5), ('T05', '05', 36.2), ('T05', '06', 57.3), ('T05', '07', 30.4), ('T05', '08', 22.0), ('T05', '09', 11.4), ('T05', '10', 19.9), ('T06', '01', 18.1), ('T06', '02', 23.3), ('T06', '03', 21.0), ('T06', '04', 33.3), ('T06', '05', 14.8), ('T06', '06', 22.5), ('T06', '07', 35.2), ('T06', '08', 27.4), ('T06', '09', 10.2), ('T06', '10', 21.2), ('T07', '01', 25.4), ('T07', '02', 33.6), ('T07', '03', 22.9), ('T07', '04', 50.4), ('T07', '05', 38.0), ('T07', '06', 34.9), ('T07', '07', 46.3), ('T07', '08', 38.7), ('T07', '09', 20.4), ('T07', '10', 28.2), ('T08', '01', 11.4), ('T08', '02', 31.3), ('T08', '03', 26.3), ('T08', '04', 15.1), ('T08', '05', 34.9), ('T08', '06', 16.6), ('T08', '07', 23.5), ('T08', '08', 9.7), ('T08', '09', 5.7), ('T08', '10', 24.5), ('T09', '01', 13.3), ('T09', '02', 11.6), ('T09', '03', 26.4), ('T09', '04', 10.4), ('T09', '05', 19.8), ('T09', '06', 26.0), ('T09', '07', 18.9), ('T09', '08', 7.8), ('T09', '09', 23.3), ('T09', '10', 21.0), ('T10', '01', 10.6), ('T10', '02', 27.8), ('T10', '03', 7.5), ('T10', '04', 6.4), ('T10', '05', 7.8), ('T10', '06', 13.7), ('T10', '07', 9.7), ('T10', '08', 8.9), ('T10', '09', 3.1), ('T10', '10', 17.0), ('T11', '01', 52.8), ('T11', '02', 27.1), ('T11', '03', 61.3), ('T11', '04', 54.5), ('T11', '05', 7.2), ('T11', '06', 9.7), ('T11', '07', 9.2), ('T11', '08', 35.5), ('T11', '09', 7.7), ('T11', '10', 26.6), ('T12', '01', 18.9), ('T12', '02', 25.4), ('T12', '03', 19.1), ('T12', '04', 15.2), ('T12', '05', 8.0), ('T12', '06', 16.3), ('T12', '07', 42.1), ('T12', '09', 11.8), ('T12', '10', 15.7), ('T13', '01', 12.7), ('T13', '02', 16.9), ('T13', '03', 4.0), ('T13', '04', 52.8), ('T13', '05', 18.8), ('T13', '06', 12.6), ('T13', '07', 7.3), ('T13', '08', 41.5), ('T13', '09', 2.4), ('T13', '10', 57.4), ] by_room = defaultdict(list) by_tool = defaultdict(list) for tool, room, drift in rows: by_room[room].append((tool, drift)) by_tool[tool].append((room, drift)) grand = mean(drift for _, _, drift in rows) total = sum((drift - grand) ** 2 for _, _, drift in rows) def group_means(groups): return {key: mean(drift for _, drift in group) for key, group in groups.items()} def between_share(groups, means): return sum(len(group) * (means[key] - grand) ** 2 for key, group in groups.items()) / total room_means = group_means(by_room) tool_means = group_means(by_tool) highest = max(room_means, key=room_means.get) lowest = min(room_means, key=room_means.get) tool_effects = dict.fromkeys(by_tool, 0.0) while True: room_levels = { room: mean(drift - tool_effects[tool] for tool, drift in group) for room, group in by_room.items() } updated = { tool: mean(drift - room_levels[room] for room, drift in group) for tool, group in by_tool.items() } change = max(abs(updated[tool] - tool_effects[tool]) for tool in by_tool) tool_effects = updated if change < 1e-12: break residual = sum((drift - (room_levels[room] + tool_effects[tool])) ** 2 for tool, room, drift in rows) print(f"Grand mean: {grand:.4f}") print(f"Total sum of squares: {total:.4f}") print(f"Between-room share: {between_share(by_room, room_means):.2%}") print(f"Between-tool share: {between_share(by_tool, tool_means):.2%}") print(f"Highest room mean: {highest} at {room_means[highest]:.4f}") print(f"Lowest room mean: {lowest} at {room_means[lowest]:.4f}") print(f"Residual share after joint fit: {residual / total:.2%}") 

The script uses Python’s standard library. The room IDs stay as strings to keep their leading zeros. Each tuple contributes its score to one room group and one tool group, and the calculations use only the completed runs shown above. The tool and room means printed or used for the separate shares are computed directly from those runs. The joint fit estimates its room levels and tool effects separately.

This is the actual printed output from running the script.

Grand mean: 23.4078 Total sum of squares: 22362.6522 Between-room share: 16.93% Between-tool share: 18.10% Highest room mean: 04 at 34.9231 Lowest room mean: 09 at 12.3154 Residual share after joint fit: 64.89% 

Read the residual in context

After the joint fit, 64.89 percent of the original spread remained. The model gives each tool the same adjustment in every room it completed. It gives each room the same level for every tool that completed it. If a tool preserves the structure especially closely in a particular room, that combination can produce a score below the joint prediction. A bigger change than the room and tool averages suggest can produce a score above it.

Those departures reflect variation that the additive model leaves unexplained. Since each observed tool and room pairing contributes a single score, any effect specific to that pairing is mixed with variation that might appear if the same run were repeated. The shares describe this test set only. Different photos or a different group of tools could change both the group averages and the spread around them.

原文:https://www.a8q9.cn/en/article/how-room-and-tool-relate-to-spread-in-staging-drift-52aae8.html

相关文章