Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix colormap generation and output folder name #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a-pru
Copy link

@a-pru a-pru commented Oct 11, 2021

(1) If there is only a single track (len(tracks)=1) in an image sequence, writing the output images fails due to issues with the generated colormap

ERROR - test_tracktor - Failed after 0:00:46!
Traceback (most recent calls WITHOUT Sacred internals):
  File "experiments/scripts/test_tracktor.py", line 165, in main
    write_images)
  File "/databricks/driver/tracking_wo_bnw/src/tracktor/utils.py", line 200, in plot_sequence
    color=cmap(track_id)
  File "/databricks/conda/envs/databricks-ml-gpu/lib/python3.7/site-packages/matplotlib/colors.py", line 612, in __call__
    self._init()
  File "/databricks/conda/envs/databricks-ml-gpu/lib/python3.7/site-packages/matplotlib/colors.py", line 899, in _init
    self.N, self._segmentdata['red'], self._gamma)
  File "/databricks/conda/envs/databricks-ml-gpu/lib/python3.7/site-packages/matplotlib/colors.py", line 516, in _create_lookup_table
    "data mapping points must start with x=0 and end with x=1")
ValueError: data mapping points must start with x=0 and end with x=1

Generating the colormap for len(tracks)+1 labels solves this problem.

(2) In test_tracktor.py the dataset variable is a string at first, then a Factory object is assigned to this variable.
Hence, the output folders for plot_sequence() are named as <object Factory at 0xsomething> - fixed by using an intermediate variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant