Skip to content

Commit

Permalink
dev(narugo): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
narugo1992 committed Nov 8, 2024
1 parent 65f7788 commit 555b541
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion imgutils/tagging/wd14.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,23 @@ def get_wd14_tags(
- ``embedding``: a 1-dim embedding of image, recommended for index building after L2 normalization
- ``prediction``: a 1-dim prediction result of image
You can extract embedding of the given image with the follwing code
>>> from imgutils.tagging import get_wd14_tags
>>>
>>> embedding = get_wd14_tags('skadi.jpg', fmt='embdding')
>>> embedding.shape
(1024, )
This embedding is valuable for constructing indices that enable rapid querying of images based on
visual features within large-scale datasets.
Example:
Here are some images for example
.. image:: tagging_demo.plot.py.svg
:align: center
>>> import os
>>> from imgutils.tagging import get_wd14_tags
>>>
>>> rating, features, chars = get_wd14_tags('skadi.jpg')
Expand Down

0 comments on commit 555b541

Please sign in to comment.