AUREOLE-R-v3 / legacy /code /draw_architecture.py
PureOne's picture
AUREOLE-R 3.0.0-hf.1: standalone public research release
9d6c005 verified
Raw
History Blame Contribute Delete
2.26 kB
"""Draw the proposed architecture; this figure is a specification, not a result."""
from pathlib import Path
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.patches import FancyBboxPatch, FancyArrowPatch
out=Path(__file__).resolve().parents[1]/'figures'
fig,ax=plt.subplots(figsize=(9.2,5.4))
ax.set(xlim=(0,10.5),ylim=(0,6));ax.axis('off')
def box(x,y,w,h,title,body,fill='#EEF5F6'):
ax.add_patch(FancyBboxPatch((x,y),w,h,boxstyle='round,pad=0.08',facecolor=fill,edgecolor='#116E83',linewidth=1.3))
ax.text(x+w/2,y+h-.24,title,ha='center',va='top',fontsize=10.3,weight='bold',color='#173746')
ax.text(x+w/2,y+h-.64,body,ha='center',va='top',fontsize=9.0,color='#243944',linespacing=1.45)
def arrow(a,b,label=None,rad=0):
ax.add_patch(FancyArrowPatch(a,b,arrowstyle='-|>',mutation_scale=12,lw=1.4,color='#486673',connectionstyle=f'arc3,rad={rad}'))
if label: ax.text((a[0]+b[0])/2,(a[1]+b[1])/2+.09,label,ha='center',fontsize=8,color='#486673',bbox={'facecolor':'white','edgecolor':'none','pad':1})
box(.22,4.35,4.18,1.28,'Authoritative engine state','Identity + generations + transforms\nGeometry/material handles + events')
box(5.6,4.35,4.18,1.28,'Renderer observations','Sparse paths + visibility + residuals\nPDFs + noise + sample lineage')
box(1.35,2.15,7.3,1.4,'One persistent, query-closed belief','Canonical response estimates + uncertainty + nuisance statistics\nValid evidence + shared light factors + local correction','#E2F0F2')
box(.22,.15,4.18,1.22,'Rendering queries','SR / RR / denoising / appearance\nTime queries / disocclusion / compression')
box(5.6,.15,4.18,1.22,'Evidence allocation','Future-loss metric W + query costs\nSample / retain / refresh / route')
arrow((2.4,4.25),(3.1,3.66),'known state')
arrow((7.6,4.25),(6.9,3.66),'new evidence')
arrow((3.1,2.06),(2.4,1.48))
arrow((6.9,2.06),(7.6,1.48))
arrow((9.95,.8),(9.95,4.23),rad=0)
ax.text(10.12,2.85,'legal physical probes',rotation=90,ha='center',va='center',fontsize=8,color='#486673')
ax.set_title('AUREOLE: proposed engine / belief / rendering interface',loc='left',fontsize=12,weight='bold',pad=9)
for ext in ['png','pdf']:
fig.savefig(out/f'architecture.{ext}',dpi=190,bbox_inches='tight')
plt.close(fig)