import curation_paths as paths import sys,json,sqlite3,collections as C,os,math W=paths.W; S=paths.S; RA=S+"/engine/source/scripts/internal/scene_generation/real_assets" sys.path[:0]=[W+"/code/modified/engine/source/scripts/internal/scene_generation/real_assets",S,W+"/code/modified/engine/supervisor_site"] import annotation_retrieval as ar, style_attribute_consumer as sac, source_attribute_consumer as src db=sqlite3.connect("file:"+paths.L+"/full_matrix_reviewed_compatibility_v6.sqlite3?mode=ro",uri=True) rel=sac.AttributeRelease(W+"/release_pose/release_00/delivery.json"); rel.verify_files=False pub=json.load(open(W+"/release_pose/publication.json")); FIX=set(pub["fix"]); c=C.Counter(); bad=[] for rid,row in rel.rows.items(): aid=row["asset_id"] if aid not in FIX: continue rec=json.loads(db.execute("select record_json from annotations where asset_id=?",(aid,)).fetchone()[0]) cand=ar.build_candidate(rec) tr=row["identity"]["canonical_transform"]["value"]["matrix_row_major"] g=row["attributes"]["geometry"]["value"]["dimensions_xyz_m"] if cand["canonical_transform"]!=tr: c["TRANSFORM_MISMATCH"]+=1; bad.append(aid); continue if any(abs(a-b)>.002 for a,b in zip(g,cand["dimensions_m"])): c["DIMS_MISMATCH"]+=1; bad.append(aid); continue pq=row["attributes"]["pose_qualification"]; c["consistent"]+=1; c["pool_"+row["processing"]["pool_status"]]+=1 c["pose_"+pq["status"]]+=1 print(dict(c)); print("examples bad",bad[:3])