[
https://issues.apache.org/jira/browse/SINGA-317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16022790#comment-16022790
]
ASF subversion and git services commented on SINGA-317:
-------------------------------------------------------
Commit 3415099a96a9b8c319fe36dd06bf28a7eea3ee92 in incubator-singa's branch
refs/heads/master from [~flytosky]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-singa.git;h=3415099 ]
SINGA-317 Extend ImageBatchIter to read labels in general format
To enable the image list file to include more general information than
label index.
Now the second part of each line (separated by user defined delimiter)
could be label strings, variable-length label indexs or a single label
index.
If it is a single label index, we return a numpy array of length =
batchsize for the label indexs. Otherwise, we return a list of length =
batchsize for the meta information of each image. Users have to parse
the information in their code.
> Extend ImageBatchIter to read labels in general format
> ------------------------------------------------------
>
> Key: SINGA-317
> URL: https://issues.apache.org/jira/browse/SINGA-317
> Project: Singa
> Issue Type: Improvement
> Reporter: wangwei
> Assignee: wangwei
>
> The current ImageBatchIter assumes the meta file for the images follows the
> format like
> {code}
> image_path, label_index
> {code}
> for each line.
> However, one image may have multiple labels or some other meta information,
> e.g.
> {code}
> image_path1, label1 label2 label3
> image_path2, label1 label3
> {code}
> To load general meta information, this ticket will update the ImageBatchIter:
> 1. assume the image_path and the other meta information (e.g. label) is
> separated by a user-defined delimiter and the meta information part should
> not include the delimiter.
> 2. split the image path and the meta information based on the delimiter
> 3. load the image and try to parse the meta information. For instance, if the
> meta information only has the label index, then we parse the label index.
> 4. return a batch of images (numpy array) and i) a list of meta information
> (one per image) ; or ii) a numpy array if the meta information is label index
> (to be compatible with previous versions).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)