Commit e7af30dd authored by narugo1992's avatar narugo1992
Browse files

Merge branch 'main' into ccip

parents ed8bb266 2819e994
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ jobs:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [ 3.7 ]
        python-version: [ 3.8 ]
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
+2 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ jobs:
    if: ${{ !contains(github.event.head_commit.message, 'ci skip') }}
    strategy:
      matrix:
        python-version: [ 3.7 ]
        python-version: [ 3.8 ]

    services:
      plantuml:
@@ -89,7 +89,7 @@ jobs:
    if: "!contains(github.event.head_commit.message, 'ci skip')"
    strategy:
      matrix:
        python-version: [ 3.7 ]
        python-version: [ 3.8 ]

    services:
      plantuml:
+4 −2
Original line number Diff line number Diff line
#file: noinspection YAMLSchemaValidation
name: Code Test

on:
@@ -7,7 +8,7 @@ jobs:
  unittest:
    name: Code test
    runs-on: ${{ matrix.os }}
    if: "!contains(github.event.head_commit.message, 'ci skip')"
    if: ${{ !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'test skip') }}
    strategy:
      fail-fast: false
      matrix:
@@ -22,7 +23,8 @@ jobs:
          - '3.10'
          - '3.11'
        exclude:
          - python-version: '3.11'
          - os: 'macos-latest'
            python-version: '3.7'

    steps:
      - name: Get system version for Linux
+1 −1
Original line number Diff line number Diff line
@@ -2,4 +2,4 @@ include README.md
include MANIFEST.in
include requirements.txt
include requirements-*.txt
recursive-include imgutils *.json *.yml *.yaml
recursive-include imgutils *.json *.yml *.yaml *.png
+7 −3
Original line number Diff line number Diff line
@@ -71,13 +71,17 @@ print(lpips_clustering(images)) # -1 means noises, the same as that in sklearn

Currently, object detection is supported for anime heads and person, as shown below

* Face Detection

![face detection](https://github.com/deepghs/imgutils/blob/gh-pages/main/_images/face_detect_demo.plot.py.svg)

* Head Detection

![head detection](https://github.com/deepghs/imgutils/blob/gh-pages/main/_images/head_detect.plot.py.svg)
![head detection](https://github.com/deepghs/imgutils/blob/gh-pages/main/_images/head_detect_demo.plot.py.svg)

* Person Detection

![person detection](https://github.com/deepghs/imgutils/blob/gh-pages/main/_images/person_detect.plot.py.svg)
![person detection](https://github.com/deepghs/imgutils/blob/gh-pages/main/_images/person_detect_demo.plot.py.svg)

Based on practical tests, head detection currently has a very stable performance and can be used for automation tasks.
However, person detection is still being further iterated and will focus on enhancing detection capabilities for
@@ -88,7 +92,7 @@ artistic illustrations in the future.
Anime images can be converted to line drawings using the model provided
by [patrickvonplaten/controlnet_aux](https://github.com/patrickvonplaten/controlnet_aux), as shown below.

![edge example](https://github.com/deepghs/imgutils/blob/gh-pages/main/_images/edge.plot.py.svg)
![edge example](https://github.com/deepghs/imgutils/blob/gh-pages/main/_images/edge_demo.plot.py.svg)

It is worth noting that the `lineart` model may consume more computational resources, while `canny` is the fastest but
has average effect. Therefore, `lineart_anime` may be the most balanced choice in most cases.
Loading