+
    Ýãk5  ã                   óà   € R t ^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RIH	t	 ]! ]
4      P                  4       P                  ^,          t]R,          t]R,          tR tR t]R8X  d
   ]! 4        R# R# )	zEFreeze a small, source-annotation-assisted negative-point experiment.N)ÚPath)Úsha256z&results/r112/species-breadth-extensionz%results/r112/outside-box-prompt-pilotc           
     ó  € V R,          w  rV R,          vr4p\         P                  ! V R,          \         P                  R7      P                  R^4      pV\         P                  ! W4.\         P                  R7      ,          pVP                  ^ R7      p/ p\        ^ V\        ^V^ ,          4      4       F�  p	\        ^ V\        ^V^ ,          4      4       Fx  p
\        P                  ! V\        V
4      \        V	4      3R4      ) pV^8  d   K9  W§^ ,          8¬  W—^,          8¬  3pW¹) V
) 3pWÈ9  g   WØV,          ^ ,          8”  g   Kq  WÚV	.3WŒ&   Kz  	  KŸ  	  \        V4       Uu. uF  qèV,          ^,          NK  	  up# u upi )zCChoose up to four image points outside the rough rotated rectangle.Úsource_dimensions_pxÚsource_bbox_globalÚsource_annotation_points_global)Údtype)ÚaxisTéÿÿÿÿ)ÚnpÚasarrayÚfloat32ÚreshapeÚarrayÚmeanÚrangeÚmaxÚcv2ÚpointPolygonTestÚfloatÚsorted)ÚrowÚwÚhÚx0Úy0Ú_ÚpolyÚcenterÚbinsÚyÚxÚdistanceÚquadrantÚvalueÚks   &              ÚS/home/mchadwick/src/ansp/diatom-research/research/r112_outside_box_prompt_select.pyÚ	negativesr'      sJ  € àÐ%Õ&�D€AØÐ)Õ*€J€BˆQÜ�:Š:�cÐ;Õ<ÄBÇJÁJÔO×WÑWÐXZÐ\]Ó^€DØŒB�HŠH�b�X¤R§Z¡ZÔ0Õ0€DØ�Y‰Y˜AˆYÓ€FØ€DÜ�1�aœ˜Q  R¥›Ö)ˆÜ�q˜!œS  A¨¥G›_Ö-ˆAÜ×,Ò,¨T´E¸!³H¼eÀA»hÐ3GÈÓNÐNˆHØ˜!Œ|ÙØ A�Y™¨°A­Y©Ð7ˆHØ˜r A 2Ð&ˆEØÔ# u°H­~¸aÕ/@Ö'@Ø"'¨Q¨ �“ó .ñ *ô !' t¤Ó-¡˜1��G�A�JˆJ¡Ñ-Ð-ùÒ-s   Å"E=c                  ó|  aa€ \         P                  R R7       \         R,          P                  4       '       d   Q h\        P                  ! \
        R,          P                  4       4      p \        P                  ! \
        R,          P                  4       4      p\        P                  ! \
        R,          P                  4       4      pVR,          \        V R,          4      u;8X  d   \        VR,          4      8X  g   Q h Q hV R,           Uu/ uF  q3R,          VbK  	  pp. pVR,           F‘  pWFR,          ,          pVR	,          R
8w  d   K"  \        V4      p\        V4      ^8  d   K?  VR,          p	V	R8”  d   RMRT	u;8:  d   R8:  d   M MRMRp
V
'       g   Kq  VP                  RVR,          RV
RV	RV/4       K“  	  R-oS Uau. uF  o\        V3R lV 4       4      NK  	  ppR pV\        V3R lV 4       VR7      R,          ,          pV\        R V 4       VR7      R,          ,          p\        V4      ^$8X  d'   \        V Uu0 uF  qîR,          kK  	  up4      ^$8X  g   Q h. R.OpRRRV Uu/ uF  pV\        \        V,          4      bK  	  upR\        \        R 4      4      R!R"R#R$R%R&RV/p\         R,          P                  \        P                   ! V^R'7      R(,           4       \#        R)\        V4      R*\%        R+ V 4       4      \%        R, V 4       4      4       R# u upi u upi u upi u upi )/T)Úexist_okzprotocol.jsonzassets.jsonzmask-hypotheses/results.jsonzmask-hypotheses/verify.jsonÚverified_recordsÚrecordsÚannotation_idÚsource_annotation_shapeÚ	RectangleÚcenter_mask_crop_fractiong      è?Úhigh_coverageg333333Ã?gš™™™™™á?Ú	referenceNÚgroupÚcenter_coverageÚnegative_points_xyc              3   óf   <"  € T F&  qR ,          S8X  g   K  VR,          R8X  g   K"  Vx € K(  	  R# 5i)r,   r2   r0   N© )Ú.0r!   Úidents   & €r&   Ú	<genexpr>Úmain.<locals>.<genexpr>:   s+   øé € Ðh™h˜¨OÕ*<ÀÑ*E”1È!ÈGÍ*ÐXgÑJg—1’1›hùó   ƒ1—1§
1c                 ó‚   € \         P                  ! R V R,          ,           P                  4       4      P                  4       # )zoutside-box-v1:r,   )Úhashlibr   ÚencodeÚ	hexdigest)r!   s   &r&   Ú<lambda>Úmain.<locals>.<lambda>;   s*   € ”G—N’NÐ$5¸¸/Õ8JÕ$J×#RÑ#RÓ#TÓU×_Ñ_Ôaó    c              3   óf   <"  € T F&  qR ,          R8X  g   K  VR,          S9  g   K"  Vx € K(  	  R# 5i)r2   r0   r,   Nr6   )r7   r!   Úknowns   & €r&   r9   r:   <   s,   øé € Ðo¡˜A¨w­Z¸?Ñ-J”aÈqÐQ`ÕOaÐinÑOn—a’a£ùr;   )Úkey:Né   Nc              3   óD   "  € T F  qR ,          R8X  g   K  Vx € K  	  R# 5i©r2   r1   Nr6   ©r7   r!   s   & r&   r9   r:   =   s   é € ÐG¡˜A¨w­Z¸;Ñ-F—a’a£ùs   ‚ –
 :Né   NÚformatz r112-outside-box-prompt-pilot-v1Úinputs_sha256Úmodel_sha256z/tmp/mobile_sam.ptÚ	selectionu<  Two visually problematic source masks observed in scene 0006 plus 22 hash-selected other center-coverage >75% rectangles and 12 hash-selected 15â€“55% coverage rectangles. Only rectangles with at least two eligible negative points were selected. This is a deliberately biased, previously examined development sample.Úmethodat  Reuse MobileSAM and its original grayscale preprocessing and center point; add at most four negative points at least four native pixels outside the rough source rectangle, selecting the farthest grid point in each quadrant. Points outside the source box may still be on diatoms. Evaluate no taxonomic or biological accuracy and retain both original and experimental masks.ÚwarningzÈSource rectangles are rough, target point may be wrong, negative points may hit other organisms, all outputs are unverified shared-model candidates, and lack of expert truth precludes a quality claim.)ÚindentÚ
Úfrozenzcases; eligible high/referencec              3   ó8   "  € T F  qR ,          R8H  x € K  	  R# 5i)r2   r0   Nr6   rI   s   & r&   r9   r:   M   s   é € ÐFwÑnvÐijÈÅzÐUdÖGdÓnvùó   ‚c              3   ó8   "  € T F  qR ,          R8H  x € K  	  R# 5irH   r6   rI   s   & r&   r9   r:   M   s=   é € ð  }jñ  aið  \]ð  @Gõ  ~Hð  LWö  ~Wó  aiùrU   )Ú14048082Ú12929072)z2results/r112/species-breadth-extension/assets.jsonz2results/r112/species-breadth-extension/verify.jsonzCresults/r112/species-breadth-extension/mask-hypotheses/results.jsonzBresults/r112/species-breadth-extension/mask-hypotheses/verify.jsonz*research/r112_outside_box_prompt_select.pyz'research/r112_outside_box_prompt_run.py)ÚOÚmkdirÚexistsÚjsonÚloadsÚDÚ	read_textÚlenr'   ÚappendÚnextr   r   ÚRr   Ú
write_textÚdumpsÚprintÚsum)ÚassetsÚqÚverifyÚrÚsourceÚeligibleÚpr   ÚptsÚcr2   r8   ÚchosenrE   r!   ÚfilesÚfÚprotocolrD   s              `      @r&   Úmainru   $   sö  ù€ Ü‡G�G�T€GÔÜ�OÕ#×+Ñ+×-Ò-Ð-Ð-Ü�ZŠZœ˜]Õ*×5Ñ5Ó7Ó8€FÜ�
Š
”AÐ6Õ6×AÑAÓCÓD€AÜ�ZŠZœÐ:Õ:×EÑEÓGÓH€FØÐ$Õ%¬¨V°IÕ->Ó)?ÖTÄ3ÀqÈÅ|ÓCTÔTÐTÑTÐTÐTØ-3°IÖ->Ó?Ñ->¨�Õ  !Ò#Ñ->€FÐ?Ø€HØˆy�\ˆ\ˆØ�Õ'Õ(ˆØÐ(Õ)¨[Ô8ÙÜ˜‹nˆÜˆs‹8�aŒ<ÙØÐ)Õ*ˆØ#$ s¤7‘¸sÀa¾È3¿±ÐTXˆß‰5Ø�O‰O˜_¨c°/Õ.BÀGÈUØ.°Ð3GÈðNö Oñ ð %€EÙv{Ô|Ñv{ÐmrŒdÔh™hÓhÖhÑv{€FÐ|Ù
a€CØ
ŒfÔo¡ÓoÐuxÔyÐz}Õ~Õ~€FØ
ŒfÑG¡ÓGÈSÔQÐRUÕVÕV€FÜˆv‹;˜"Ô¤Á&Ó%IÁ&¸Q¨×&8Ð&8Á&Ñ%IÓ!JÈbÔ!PÐPÐPò8€Eð Ð<Ø¹EÓ!B¹E°q !¤V¬A°­E£]Ò"2¹EÑ!BØ¤¤tÐ,@Ó'AÓ BØð  \Øð  QØð  fØ˜6ð#€Hô ˆÕ×$Ñ$¤T§Z¢Z°ÀÔ%CÀdÕ%JÔKÜ	ˆ(”C˜“KÐ!AÄ3ÑFwÑnvÓFwÓCwÔy|ñ  }jñ  aió  }jó  zjö  kùòE @ùò }ùò &Jùò "Cs   ÄL*Ç
L/ÉL4É7 L9
Ú__main__)Ú__doc__r=   r\   Úpathlibr   r   Únumpyr   Ú diatom_pilot.ude_scaleup_datasetr   Ú__file__ÚresolveÚparentsrc   r^   rY   r'   ru   Ú__name__r6   rB   r&   Ú<module>r      sm   ðÙ KÛ Û Ý ã 
Û å 3áˆƒN×ÑÓ×$Ñ$ QÕ'€ØÐ0Õ0€ØÐ/Õ/€ò.ò()kðX ˆzÔÙ†Fñ rB   