+
    »k   ã                  óh  € R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIt^ RI	H
t
 ]! ]4      P                  4       P                  P                  t]R,          ]R,          ]R,          ]R,          ]R	,          3tR
 R lt ! R R4      tR]R,          R]R,          R]R,          R]R,          RRRR/tR tR# )a•  Read R112 *development-only* synthetic scenes without inventing background labels.

The projected supports are weak hypotheses, not verified ground truth. All pixels
are marked unknown because Academy background structures and visibility have not
been annotated, including beneath insertions. This reader makes no loss-policy
choices; a caller must explicitly choose an uncertainty-aware learning method.
)ÚannotationsN)ÚPath)ÚImagez.results/r112/weak-development-v1/manifest.jsonz*results/r112/weak-diverse-v1/manifest.jsonz0results/r112/weak-breadth-depth-v1/manifest.jsonz+results/r112/weak-new-taxa-v1/manifest.jsonz2results/r112/broad-background-scenes/manifest.jsonc               ó    € V ^8„  d   QhRRRR/# )é   Úpathr   ÚreturnÚstr© )Úformats   "Ú"diatom_pilot/weak_scene_dataset.pyÚ__annotate__r      s   € ÷ ñ �ð �sñ ó    c                ó$  a€ \         P                  ! 4       pV P                  R 4      ;_uu_ 4       o\        V3R lR4       F  q!P	                  V4       K  	  RRR4       VP                  4       #   + '       g   i     TP                  4       # ; i)Úrbc                 ó&   <€ S P                  R4      # )i   i   )Úread)Úfs   €r   Ú<lambda>Údigest.<locals>.<lambda>   s   ø€ �q—v‘v˜iÔ(r   r   N)ÚhashlibÚsha256ÚopenÚiterÚupdateÚ	hexdigest)r   ÚhÚbr   s   &  @r   Údigestr      s[   ø€ Ü
‡>‚>Ó€Ø
‡i�i�‡o„o˜ÜÔ(¨Ö-€a¯h©h°q®kÑ-÷ à	�‰‹Ð÷ †oà	�‰‹Ðús   °(A0Á0B	c                  ó:   € ] tR t^tRt]RRRR3R ltR tR tRt	R# )	ÚWeakSceneDatasetzVFramework-independent access to grayscale pixels, overlapping supports and provenance.TFNc           	     	ó   € VR9  d   \        R4      hW n        W0n        Vf   \        MTV n        . V n        \        \        V4       EF  p\        P                  ! VP                  4       4      qwR,          R9   g   Q hVR,          R8H  pV'       d   Vf   \        R4      hV'       g   Ve   \        R4      h\        V4      p	VR,           Fy  p
V
R,          R8w  d   \        R	4      hV'       d2   V
P                  R
4      R9  d   \        R4      hV
R
,          V8w  d   KU  V P
                  P                  WiW§R,          34       K{  	  EK  	  R # )Nz0Expected train or validation synthetic partitionr   ú r112-grouped-synthetic-scenes-v1zBExplicit train or validation partition required for grouped scenesz:Requested partition on a manifest without group separationÚrecordsÚsplitÚdevelopment_onlyz%Only development scenes may be loadedÚsynthetic_partitionzInvalid grouped scene partition)NÚtrainÚ
validation)úr112-weak-development-v1úr112-weak-diverse-v1úr112-weak-breadth-depth-v1úr112-weak-new-taxa-v1úr112-broad-background-scenes-v1r"   )r'   r(   )Ú
ValueErrorÚverify_hashesÚinclude_mask_variantsÚ
MASK_ROOTSÚ
mask_rootsÚentriesÚmapr   ÚjsonÚloadsÚ	read_textr   ÚgetÚappend)ÚselfÚ	manifestsr/   r0   r2   r&   r   ÚdataÚgroupedÚmhÚscenes   &&&&&&     r   Ú__init__ÚWeakSceneDataset.__init__   sc  € ØÐ ;Ô;Ä*ÐMó  CAð  =AØ"ÔÐ>SÔ#=Ðr|ò  sEÕdnð  KUÐTXÔTcð  ceð  VZô  VbÜ”$�y×!€dÜ�
Š
�4—>‘>Ó#Ó$€4°­Nð  ?lô  -lð  &lð  -lØ��>Ð=Ñ=€7ßÐ%Ò-´Jð  @Dó  5Eð  /Eß
Ð)Ò5¼Jð  HDó  =Eð  7EÜˆTƒl€2Ø�Y—�€uØˆW…~Ð)Ô)´
Ð;bÓ0cÐ*cßØ�	‰	Ð'Ó(Ð0FÔFÌZÐXyÓMzÐGzØÐ#Õ$Ð&9Ô9¹(Ø‡L�L×Ñ˜ 5¨x­.Ð9Ö:ô  ó "r   c                	ó,   € \        V P                  4      # ©N)Úlenr3   )r:   s   &r   Ú__len__ÚWeakSceneDataset.__len__%   s   € œ#˜dŸl™lÓ+Ð+r   c                	óx
  € V P                   V,          w  r#rEVP                  qfVR ,          ,          qvVR,          ,          pV P                  '       d:   \        V4      VR,          8w  g   \        V4      VR,          8w  d   \	        R4      h\
        P                  ! \        P                  ! V4      P                  R4      4      P                  4       p	\
        P                  ! VRR7      ;_uu_ 4       p
\        ;QJ d    . R V
R	,           4       F  NK  	  5M! R V
R	,           4       4      p\        V4      ^8X  d7   V^ ,          \        VR
,          4      8X  d   VR,          V	P                  8X  g   Q h\        V
R,          4      R8w  g   \        V
R,          4      R8w  d   \	        R4      h\
        P                   ! V
R,          4      p\        V4      \
        P"                  ! V4      8¼  g   Q hVR\
        P"                  ! V4       P%                  V4      P'                  \(        4      pRRR4       R V	RXR\
        P*                  ! V	P                  \(        R7      R
VR
,          RVR,          R\        V4      RVRVR,          RVR,          RRRR/pVR 8X  d   VR!,          VR!&   V P,                  '       Edf   WPP.                  9  d   \	        R"4      hV P.                  V,          p. p\1        VR
,          4       EFÐ  w  ppVf|   \2        VR#,          ,          pV P.                  P5                  4        Uu0 uF"  pVf   K	  \7        V4      P9                  4       kK$  	  ppVP9                  4       V9  d   \	        R$4      hM\7        V4      pR%VR&,          R'VR(,          /VR),          R*,          VR),          R+,          .p. pV F©  pVVR%,          ,          pV P                  '       d#   \        V4      VR',          8w  d   \	        R,4      h\
        P                  ! \        P                  ! V4      P                  R4      4      ^ 8„  pVP;                  \=        VVV	P                  4      4       K«  	  \
        P>                  ! V^ ,          VV,          4      '       g   \	        R-4      hVP;                  \
        P@                  ! V4      4       EKÓ  	  \
        P@                  ! V4      VR.&   VR.,          PC                  ^\
        PD                  R/7      VR0&   R4VR1&   R2VR3&   V#   + '       g   i     ELÿ; iu upi )5ÚimageÚmask_archiveÚimage_sha256Úmask_archive_sha256z*Scene or support archive checksum mismatchÚLF)Úallow_picklec              3  ó8   "  € T F  p\        V4      x € K  	  R # 5irC   ©Úint)Ú.0Úvs   & r   Ú	<genexpr>Ú/WeakSceneDataset.__getitem__.<locals>.<genexpr>+   s   é € Ð2Ñ1˜!Œs�1�vˆvÓ1ùó   ‚Úsupport_shapeÚ	instances:é   NNÚbackground_label_statusÚunknownÚtransparent_visibility_statusÚ	undefinedzUnexpected label semanticsÚsupport_bitsNÚweak_projected_supportsÚunknown_region©ÚdtypeÚscene_idÚidÚmanifestÚmanifest_sha256Ú
backgroundÚbackground_um_per_pixel_xyÚlabel_statuszsunverified weak projected support, not ground truth; visibility undefined; entire original scene background unknownr$   r%   r"   r&   z)No source mask root for this scene formatÚsource_mask_rootz5Source mask root is not an approved dataset directoryÚfileÚsource_mask_centerr   Úsource_mask_center_sha256Úalternate_masksÚminusÚpluszSource mask checksum mismatchz3Center mask reprojection differs from scene supportÚweak_mask_proposals)Úaxisra   Úweak_mask_vote_countÚmask_proposal_orderzQShared-model proposal agreement only; not calibrated uncertainty or ground truth.Úmask_vote_status)Úcenterrn   ro   )#r3   Úparentr/   r   r.   ÚnpÚasarrayr   r   ÚconvertÚcopyÚloadÚtuplerD   Úshaper	   Ú
unpackbitsÚprodÚreshapeÚastypeÚboolÚonesr0   r2   Ú	enumerateÚROOTÚvaluesr   Úresolver9   Úproject_source_maskÚarray_equalÚstackÚsumÚuint8)r:   Úindexrd   r>   r?   Úformat_nameÚ	directoryÚ
image_pathÚarchive_pathrH   Úzr}   ÚbitsÚsupportÚresultÚ
fixed_rootÚvariantsÚiÚinstanceÚrootÚxÚallowedÚspecsÚ	proposalsÚspecr   Úsources   &&                         r   Ú__getitem__ÚWeakSceneDataset.__getitem__&   s=  € Ø $§¡¨UÕ 3Ñ€(ˆe¸h¿o¹o°IÐchÐipÕcqÕYqÈjð  JOð  P^õ  J_õ  @_Ðr~Ø	××ÐœV JÓ/°°~Õ1FÔFÌ&ÐQ]ÓJ^Ð`eÐf{Õ`|ÔJ|ô  EOð  P|ó  E}ð  }Ü
�
Š
”5—:’:˜jÓ)×1Ñ1°#Ó6Ó7×<Ñ<Ó>€%Ü	‡w‚wˆ|¨×/Õ/°1ß	ŒÑ2˜q Ö1Ó2�‰Ñ2˜q Ö1Ó2Ó	2€5¼#¸e»*Àa¼-ÈEÐRSÍHÔVYÐZ_Ð`kÕZlÓVmÔLmÐrwÐxzÕr{ð  ~C÷  ~Iñ  ~Iô  sIð  4Ið  ;IÜ	ˆ!Ð%Õ
&Ó'¨Ô2´c¸!Ð<[Õ:\Ó6]Ð_jÔ6jÔq{ð  }Yó  rZð  lZÜ
�Š�a˜Õ'Ó(€4´°D³	¼2¿7º7À5»>Ô0IÐ)IÐ0IÐRVÐWfÔXZ×X_ÒX_Ð`eÓXfÐRg×RoÑRoÐpuÓRv×R}ÑR}ô  Có  SDÈ'÷ 0ð �%Ð1°'Ð:JÌ2Ï7Ê7ÐSX×S^ÑS^ÔeiÔKjÐkvÐw|ð  ~Iõ  xJð  KUð  V[ð  \`õ  Vað  blô  mpð  qyó  mzð  {Lð  MOð  P\ð  ]bð  coõ  ]pð  qMð  NSð  Tpõ  Nqð  r@ð  Avð  w~ð  Qð  
R€&ØÐ4Ô4ÐSXÐYnÕSo°VÐ<QÑ5RØ	××ÑØŸ™Ô(¬zÐ:eÓ/fÐ)fØ�o‰o˜kÕ*€:°B¨8Ü˜u [Õ1×2�z€qˆØÒÜ
ˆxÐ*Õ+Õ
+€TÐPT×P_ÑP_×PfÑPfÔPhÓ4zÑPhÈ1ÐlmÔ5F´T¸!³W·_±_Ö5FÑPh¨GÐ4zØ�‰‹˜gÔ%¬JÐ7nÓ,oÐ&oÐ%Ü�:ÓˆØ�8Ð0Õ1°(¸8ÐD_Õ;`ÐaÐbjÐk|Õb}ð  Fõ  cGð  HPð  Qbõ  Hcð  djõ  Hkð  l€Eð  wyð  mvÛˆØ
ˆt�F�|Õ
€TØ××Ðœv d›|¨T°(­^Ô;Ä*ÐMlÓBmÐ<mÜ�JŠJ”u—z’z $Ó'×/Ñ/°Ó4Ó5°aÑ7€V¸	×8HÑ8HÔI\Ð]cÐdlÐmr×mxÑmxÓIyÖ8zñ ô �>Š>˜) A�, w¨q¥z×2Ò2¼ÐDyÓ9zÐ3zØ‡O�O”B—H’H˜YÓ'×(ñ 3ô "$§¢¨(Ó!3€6Ð
Ñ Ø"(Ð)>Õ"?×"CÑ"CÈÔQS×QYÑQYÐ"CÓ"Z€6Ð
 Ñ!Ø!:€6Ð
Ñ Øq€6Ð
ÑØ	€-÷3 0×/Ð/üò 5{s   Ã3D:T#Ì9T7ÍT7Ô#T4	)r3   r0   r2   r/   )
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚDEFAULT_MANIFESTSr@   rE   r¡   Ú__static_attributes__r
   r   r   r    r       s&   † Ù]Ø.¸TÐX]Ðimð  CGô ;ò ,ör   r    r)   z*results/r112/species-depth/mask-hypothesesr*   z,results/r112/diversity-fetch/mask-hypothesesr+   z*results/r112/breadth-depth/mask-hypothesesr,   z%results/r112/new-taxa/mask-hypothesesr-   r"   c                ó  € ^ RI p\        P                  ! V \        P                  R7      pVP                  ^8w  d   \        R4      h\        ;QJ d    . R VR,           4       F  NK  	  5M! R VR,           4       4      p\        V4      ^8w  g   \        V4      ^8  d   \        R4      hVP                  WEVP                  R7      p\        P                  ! \        P                  ! V4      P                  VR,          \        P                  P                  R	R
7      4      ^ 8„  pVw  r‰VP                   w  r«VR,          ^ ,          V^,          ,
          qÁR,          ^,          V
^,          ,
          p\#        ^ V4      \#        ^ V4      rþ\        WœV,           4      \        W�V
,           4      pp\        P$                  ! W‰3\&        R7      pVV8”  d:   VV8”  d3   WV,
          VV,
          1Wì,
          VV,
          13,          VVV1VV13&   V# )zIReproject one source mask using the renderer's nearest-neighbor geometry.Nr`   z!Source proposal must be a 2D maskc              3  ó8   "  € T F  p\        V4      x € K  	  R # 5irC   rO   )rQ   r›   s   & r   rS   Ú&project_source_mask.<locals>.<genexpr>V   s   é € Ð@Ñ?�qŒC��FˆFÓ?ùrU   Úresampled_dimensions_pxzInvalid resampled dimensions)ÚinterpolationÚrotation_ccw_degreesT)ÚresampleÚexpandÚ	center_xy)Úcv2rw   rx   rŒ   Úndimr.   r|   rD   ÚminÚresizeÚINTER_NEARESTr   Ú	fromarrayÚrotateÚ
ResamplingÚNEARESTr}   ÚmaxÚzerosr‚   )Úsource_maskr™   Úcanvas_shaper³   r    ÚdimsÚresizedÚrotatedÚheightÚwidthr   Úwr›   ÚyÚx0Úy0Úx1Úy1Úouts   &&&                r   rˆ   rˆ   Q   s©  € ãÜ
�
Š
�;¤R§X¡XÔ.€Ø
‡K�K�„NœÐ$GÓHÐHß„eÑ@˜HÐ%>Ö?Ó@‡e�eÑ@˜HÐ%>Ö?Ó@Ó@€ÜˆƒIˆq„L”C˜“I˜a”K¤jÐ1OÓ&PÐ PØ	�‰�F¨c×.?Ñ.?ˆÓ	@€Ü	�Š”E—O’O GÓ,×3Ñ3°HÐ=SÕ4TÔ^c×^nÑ^n×^vÑ^vð  CÐ3ó  Dó  
Eð  FGñ  
G€Ø�€˜wŸ}™}™3˜1¨x¸Õ/DÀQÕ/GÈÈ1ÍÕ/L¨QÐXcÕOdÐefÕOgÐhiÐklÕhlÕOlÈQÜ
ˆ1ˆQƒx”�A�a“€Bœs 5¨1­›~¬c°&¸1½«o˜B˜Ä"Ç(Â(ÈFÈ>Ô`dÔBe¸cØ€r„Eˆb�Œe W°­T°"°Qµ$¨Y°rµt¸B¸q½D°yÐ-@Õ%A�C˜˜2˜˜b ˜e˜Ñ$Ø€r   )r§   Ú
__future__r   r   r5   Úpathlibr   Únumpyrw   ÚPILr   Ú__file__r‡   rv   r…   r¨   r   r    r1   rˆ   r
   r   r   Ú<module>rÑ      sâ   ðñõ #ß Ý Û Ý Ù	ˆ(ƒ^×ÑÓ×$Ñ$×+Ñ+€ØÐHÕHÈÐNzÕIzÐ{ð  Asõ  |sð  txð  yfõ  tfð  gkð  l`õ  g`ð  aÐ õ÷
/ñ /ðj ˜DÐ!MÕMØ˜ÐKÕKØ˜dÐ#OÕOØ˜ÐEÕEØ" 4Ø# Dð€
ôr   