votchallenge / toolkit

The official VOT Challenge evaluation and analysis toolkit
http://www.votchallenge.net/
GNU General Public License v3.0
153 stars 43 forks source link

Frame does not have information for channel: depth #38

Closed buyudtx closed 2 years ago

buyudtx commented 2 years ago

I make sure that the sequences include depth channel

Checking for new version Scanning registry /content/vot-toolkit-python/trackers.ini Found 1 trackers Generating dummy sequence Obtaining runtime for tracker Siam_LTD Initializing tracker (1/3) Running process: /usr/bin/python3 -m run_Siam_LTD @@TRAX:hello "trax.name=" "trax.family=" "trax.image=path;" "trax.region=rectangle;" "trax.description=" "trax.version=3" "vot=python" "trax.channels=color;depth;" Frame does not have information for channel: depth Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/vot/utilities/cli.py", line 384, in main do_test(args) File "/usr/local/lib/python3.7/dist-packages/vot/utilities/cli.py", line 90, in dotest region, , _ = runtime.initialize(sequence.frame(0), sequence.groundtruth(0)) File "/usr/local/lib/python3.7/dist-packages/vot/tracker/trax.py", line 429, in initialize return self._process.initialize(frame, region, tproperties) File "/usr/local/lib/python3.7/dist-packages/vot/tracker/trax.py", line 251, in initialize tlist = convert_frame(frame, self._client.channels) File "/usr/local/lib/python3.7/dist-packages/vot/tracker/trax.py", line 78, in convert_frame raise DatasetException("Frame does not have information for channel: {}".format(channel)) vot.dataset.DatasetException: Frame does not have information for channel: depth @@TRAX:quit

yyk-nb commented 2 years ago

hi i met the same question. have u solved them? thanks

xiaozai commented 2 years ago

@yyk-nb Hi, you can set the depth channels in the VOT class,

class VOT(object):
    def __init__(self, region_format, channels=None):
        assert(region_format in [trax.Region.RECTANGLE, trax.Region.POLYGON, trax.Region.MASK])
        if channels is None:
            channels = ['color']
        elif channels == 'rgbd':
            channels = ['color', 'depth']
        elif channels == 'depth':
            channels = ['depth']
        elif channels == 'rgbt':
            channels = ['color', 'ir']
        elif channels == 'ir':
            channels = ['ir']
        else:
            raise Exception('Illegal configuration {}.'.format(channels))

        self._trax = trax.Server([region_format], [trax.Image.PATH], channels, customMetadata=dict(vot="python"))
xiaozai commented 2 years ago

and in your run_vot function :

        import pytracking.evaluation.vot2022 as vot

        """Run tracker on VOT."""

        # if output_segmentation:
        #     handle = vot.VOT("mask")
        # else:
        handle = vot.VOT("rectangle", channels='rgbd')

        vot_anno = handle.region()

        image_path = handle.frame()
        if not image_path:
            return
        image_path = _convert_image_path(image_path)
        print(image_path)
        color, depth = self._read_image_rgbd(image_path)
yyk-nb commented 2 years ago

thanks a lot! I found that my problem is that i can't let the program use the right dataset, which using a image in a directory named tmp