Skip to content

Commit

Permalink
Update README.md, ci skip
Browse files Browse the repository at this point in the history
  • Loading branch information
narugo1992 authored Oct 4, 2024
1 parent 8c8c208 commit 87216d3
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,30 +178,6 @@ For more details, please refer to
the [official documentation](https://deepghs.github.io/imgutils/main/api_doc/validate/monochrome.html#module-imgutils.validate.monochrome)
.

### Image Rating

We can use `imgutils` to perform a rough and quick determination of the rating (`safe`, `r15`, or `r18`) of anime
images, as shown below.

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

```python
from imgutils.validate import anime_rating

print(anime_rating('rating/safe/1.jpg')) # ('safe', 0.9999998807907104)
print(anime_rating('rating/safe/2.jpg')) # ('safe', 0.9924363493919373)
print(anime_rating('rating/safe/3.jpg')) # ('safe', 0.996969997882843)
print(anime_rating('rating/safe/4.jpg')) # ('safe', 0.9966891407966614)
print(anime_rating('rating/r15/5.jpg')) # ('r15', 0.9996721744537354)
print(anime_rating('rating/r15/6.jpg')) # ('r15', 0.9998563528060913)
print(anime_rating('rating/r15/7.jpg')) # ('r15', 0.9827859997749329)
print(anime_rating('rating/r15/8.jpg')) # ('r15', 0.8339558839797974)
print(anime_rating('rating/r18/9.jpg')) # ('r18', 0.9997004270553589)
print(anime_rating('rating/r18/10.jpg')) # ('r18', 0.9997699856758118)
print(anime_rating('rating/r18/11.jpg')) # ('r18', 0.9999485015869141)
print(anime_rating('rating/r18/12.jpg')) # ('r18', 0.9994290471076965)
```

### Truncated Image Check

The following code can be used to detect incomplete image files (such as images interrupted during the download
Expand Down Expand Up @@ -324,4 +300,4 @@ mask_, image_ = segment_rgba_with_isnetis('skadi.jpg')
image_.save('skadi_seg.png')
```

This model can be found at https://huggingface.co/skytnt/anime-seg .
This model can be found at https://huggingface.co/skytnt/anime-seg .

0 comments on commit 87216d3

Please sign in to comment.