zenseact / zod

Software Development Kit for the Zenseact Open Dataset (ZOD)
https://zod.zenseact.com
MIT License
92 stars 13 forks source link

extract_tsr_patches.py bug #45

Closed TheBigCodeman closed 2 months ago

TheBigCodeman commented 3 months ago

Hey,

I have encountered the issue

AssertionError: Project AnnotationProject.TRAFFIC_SIGNS not available.

I have tried using another issues' resolution, which also stated that this is because

some annotations don't have traffic signs.

try:
        traffic_signs: List[parser.TrafficSignAnnotation] = frame.get_annotation(
            constants.AnnotationProject.TRAFFIC_SIGNS
        )
except AssertionError:
        return []

which resulted in outputting an empty JSON file, which looks like

{"train": [], "val": []}

The code however, does successfully output all the images (both train & val), though it reaches 99995 out of 100000 - I believe this may be normal.

And how does the dataset want us to do TrafficSignal classification please?

wljungbergh commented 2 months ago

Hi, we have now fixed this file and also added an interface in the CLI (see this commit). You can now extract the patches by running the following code

zod generate tsr-patches --dataset-root <path-to-dataset> --output-dir "/tmp/zod-patches" --version mini

As for TrafficSignal Classification. We do not have any labels on what state the traffic signal is in (red, green yellow), hence we do not have the possibility to do classification.

atonderski commented 2 months ago

note that to use this you have to install from latest master. a new package version will be published later this week