Quantcast
Channel: TAO Toolkit - NVIDIA Developer Forums
Viewing all articles
Browse latest Browse all 562

Offline Augmentation error with translation operation

$
0
0

• TLT Version: tao-toolkit:5.5.0-data-services

I am trying to run some offline augmentation. The current TAO documentation being completely outdated, I have been referring to: nvidia_tao_ds.

I’m getting an error with the translation augmentation. At the moment I am unable to specified a list with length > 1.
According to the code, translation should be a list of int

@dataclass
class TranslationConfig:
    """Translation configuration template."""

    translate_x: List[int] = LIST_FIELD(arrList=[0], default_value=[0])
    translate_y: List[int] = LIST_FIELD(arrList=[0], default_value=[0])

My configuration is therefore a list of ints

spatial_aug:
  flip :
    flip_vertical: false
    flip_horizontal: true
  translation:
    translate_x: [0, 100, 200]
    translate_y: [0, 100, 200]

But I am getting the following error:

Error executing job with overrides: []TypeError: float() argument must be a string or a real number, not 'DataNode'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/nvidia_tao_ds/augment/scripts/generate.py", line 163, in main
    run_augment(cfg)
  File "/usr/local/lib/python3.10/dist-packages/nvidia_tao_ds/core/decorators.py", line 82, in _func
    raise e
  File "/usr/local/lib/python3.10/dist-packages/nvidia_tao_ds/core/decorators.py", line 51, in _func
    runner(cfg, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/nvidia_tao_ds/augment/scripts/generate.py", line 70, in run_augment
pipe = pipeline_dict[dataset_type](  File "/usr/local/lib/python3.10/dist-packages/nvidia_tao_ds/augment/pipeline/sharded_pipeline.py", line 276, in build_kitti_pipeline
    pipe = sharded_kitti_pipeline(
  File "/usr/local/lib/python3.10/dist-packages/nvidia/dali/pipeline.py", line 1958, in create_pipeline
    _generate_graph(pipe, pipe_func, args, fn_kwargs)
  File "/usr/local/lib/python3.10/dist-packages/nvidia/dali/pipeline.py", line 1809, in _generate_graph
    pipe_outputs = func(*fn_args, **fn_kwargs)
  File "/usr/local/lib/python3.10/dist-packages/nvidia_tao_ds/augment/pipeline/sharded_pipeline.py", line 256, in sharded_kitti_pipeline
    mt = spatial_transform(
  File "/usr/local/lib/python3.10/dist-packages/nvidia_tao_ds/augment/pipeline/sharded_pipeline.py", line 65, in spatial_transform
    offset = np.float32(
ValueError: setting an array element with a sequence.

The value returned from random_pick function is of type DataNode

def random_pick(values):
    """Randomly pick from values or range."""
    if len(values) == 0:
        value = 0
    elif len(values) == 1:
        value = values[0]
    elif len(values) == 2:
        value = dali.fn.random.uniform(range=tuple(values))
    else:
        value = dali.fn.random.uniform(values=list(values))
    return value

Is that correct or is there a bug? is the Dali pipeline well implemented?
I am not familiar with the Dali library so I did not spend much time investigating.

Thanks

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 562

Trending Articles