Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

im2rec documentation is lacking / buggy #11884

@kjchalup

Description

@kjchalup

im2rec.py doesn't have docstrings. The online doc that describes the RecordIO format (here) doesn't describe how to use the script. Another page does, but it could really use a full-fledged real-world example, and should either be unified with or at least linked to from the other doc page.

In addition, the im2rec.py script encodes class labels as floating point numbers:

def write_list(path_out, image_list):
    with open(path_out, 'w') as fout:
        for i, item in enumerate(image_list):
            line = '%d\t' % item[0]
            for j in item[2:]:
                line += '%f\t' % j ### <---- THIS IS THE FLOATING POINT LABEL
            line += '%s\n' % item[1]
            fout.write(line)

But the doc page has integer labels in the example. When trying to make my own test .lst file by hand I used integer labels which in fact didn't work with mx.io.ImageRecordIter. It'd be great to get a clarification on the exact required .lst file format.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions