Commit c4ca573d authored by narugo1992's avatar narugo1992
Browse files

dev(narugo): save it, ci skip

parent 584d2c51
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ class HalfBodyDetectBenchmark(BaseBenchmark):
if __name__ == '__main__':
    create_plot_cli(
        [
            # ('halfbody v1.0 (yolov8s)', HalfBodyDetectBenchmark('s', 'v1.0')),
            ('halfbody v1.0 (yolov8s)', HalfBodyDetectBenchmark('s', 'v1.0')),
            # ('halfbody v1.0 (yolov8n)', HalfBodyDetectBenchmark('n', 'v1.0')),
            ('halfbody v0.4 (yolov8s)', HalfBodyDetectBenchmark('s', 'v0.4')),
            ('halfbody v0.3 (yolov8s)', HalfBodyDetectBenchmark('s', 'v0.3')),
+0 −2346

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −468

File deleted.

Preview size limit exceeded, changes collapsed.

+7 −6
Original line number Diff line number Diff line
@@ -12,12 +12,13 @@ Overview:
    .. image:: halfbody_detect_benchmark.plot.py.svg
        :align: center

    .. warning::
    .. note::
        Please note that the primary purpose of this tool is to crop upper-body images from illustrations.
        Therefore, the training data used mostly consists of single-person images, and the performance
        on images with multiple people is not guaranteed. **If you indeed need to process images with multiple people,
        the recommended approach is to first use the :func:`imgutils.detect.detect_person` function to
        crop individuals, and then use this tool to obtain upper-body images**.
        Therefore, the training data used mostly consists of single-person images, and **the performance
        on images with multiple people is not guaranteed**. If you indeed need to process
        images with multiple people, the recommended approach is to first use
        the :func:`imgutils.detect.person.detect_person` function to crop individuals,
        and then use this tool to obtain upper-body images.

"""
from functools import lru_cache
@@ -41,7 +42,7 @@ def _open_halfbody_detect_model(level: str = 's', version: str = 'v1.0'):
_LABELS = ["halfbody"]


def detect_halfbody(image: ImageTyping, level: str = 's', version: str = 'v0.4', max_infer_size=640,
def detect_halfbody(image: ImageTyping, level: str = 's', version: str = 'v1.0', max_infer_size=640,
                    conf_threshold: float = 0.5, iou_threshold: float = 0.7) \
        -> List[Tuple[Tuple[int, int, int, int], str, float]]:
    """
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ class TestDetectHead:
            values.append((bbox, int(score * 1000) / 1000))

        assert values == pytest.approx([
            ((106, 0, 512, 478), 0.916),
            ((105, 0, 511, 480), 0.918),
        ])

    def test_detect_halfbody_none(self):