You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
</span><spanid="L-32"><ahref="#L-32"><spanclass="linenos"> 32</span></a><spanclass="w"></span><spanclass="sd">"""Calculates boxes in XYXY format around masks. Return [0,0,0,0] for an empty mask.</span>
99
+
</span><spanid="L-32"><ahref="#L-32"><spanclass="linenos"> 32</span></a><spanclass="w"></span><spanclass="sd">"""Calculates boxes in XYXY format around masks. Return [0, 0, 0, 0] for an empty mask.</span>
</span><spanid="L-34"><ahref="#L-34"><spanclass="linenos"> 34</span></a><spanclass="sd"> For input shape C1xC2x...xHxW, the output shape is C1xC2x...x4.</span>
</span><spanid="L-38"><ahref="#L-38"><spanclass="linenos"> 38</span></a><spanclass="sd"> It further ensures that inputs are boolean tensors, otherwise the function yields wrong results.</span>
106
106
</span><spanid="L-39"><ahref="#L-39"><spanclass="linenos"> 39</span></a><spanclass="sd"> See https://github.com/facebookresearch/segment-anything/issues/552 for details.</span>
</span><spanid="L-43"><ahref="#L-43"><spanclass="linenos"> 43</span></a><spanclass="c1"># torch.max below raises an error on empty inputs, just skip in this case</span>
</span><spanid="batched_mask_to_box-33"><ahref="#batched_mask_to_box-33"><spanclass="linenos">33</span></a><spanclass="w"></span><spanclass="sd">"""Calculates boxes in XYXY format around masks. Return [0,0,0,0] for an empty mask.</span>
236
+
</span><spanid="batched_mask_to_box-33"><ahref="#batched_mask_to_box-33"><spanclass="linenos">33</span></a><spanclass="w"></span><spanclass="sd">"""Calculates boxes in XYXY format around masks. Return [0, 0, 0, 0] for an empty mask.</span>
</span><spanid="batched_mask_to_box-35"><ahref="#batched_mask_to_box-35"><spanclass="linenos">35</span></a><spanclass="sd"> For input shape C1xC2x...xHxW, the output shape is C1xC2x...x4.</span>
</span><spanid="batched_mask_to_box-39"><ahref="#batched_mask_to_box-39"><spanclass="linenos">39</span></a><spanclass="sd"> It further ensures that inputs are boolean tensors, otherwise the function yields wrong results.</span>
243
243
</span><spanid="batched_mask_to_box-40"><ahref="#batched_mask_to_box-40"><spanclass="linenos">40</span></a><spanclass="sd"> See https://github.com/facebookresearch/segment-anything/issues/552 for details.</span>
</span><spanid="batched_mask_to_box-44"><ahref="#batched_mask_to_box-44"><spanclass="linenos">44</span></a><spanclass="c1"># torch.max below raises an error on empty inputs, just skip in this case</span>
0 commit comments