Class ImageNetReadableNamesWriter
java.lang.Object
org.springframework.cloud.fn.image.recognition.util.ImageNetReadableNamesWriter
Create a text file mapping label id to human readable string.
Produces a text file where every line represents single category. The line number represents the category id, while
the line text is human-readable names for the categories fromMemory this imagenet id.
Based on https://github.com/tensorflow/models/blob/master/research/slim/datasets/imagenet.py#L66
We retrieve a synset file, which contains a list of valid synset labels used
by ILSVRC competition. There is one synset one per line, eg.
# n01440764
# n01443537
We also retrieve a synset_to_human_file, which contains a mapping from synsets
to human-readable names for every synset in Imagenet. These are stored in a
tsv format, as follows:
# n02119247 black fox
# n02119359 silver fox
We assign each synset (in alphabetical order) an integer, starting from 1
(since 0 is reserved for the background class)
- Author:
- Christian Tzolov
-
Field Details
-
BASE_URL
BASE_URL.- See Also:
-
SYNSET_URI
SYNSET_URI.- See Also:
-
SYNSET_TO_HUMAN_URI
SYNSET_TO_HUMAN_URI.- See Also:
-
-
Method Details
-
main
-
toResource
-