How fpenet is trained in three channels?

• Network Type fpenet
• TLT Version 4.0
I read the latest documentation, which states that the channel parameter can be 1 and 3.
But it reports an error in actual use:

Traceback (most recent call last):
  File "</usr/local/lib/python3.6/dist-packages/driveix/fpenet/scripts/train.py>", line 3, in <module>
  File "<frozen driveix.fpenet.scripts.train>", line 164, in <module>
  File "<frozen driveix.fpenet.scripts.train>", line 142, in main
  File "<frozen driveix.fpenet.trainers.fpenet_trainer>", line 169, in build
  File "<frozen driveix.fpenet.losses.fpenet_loss>", line 331, in transform_images
  File "<frozen driveix.fpenet.losses.fpenet_loss>", line 382, in _apply_augmentations_to_frame
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/image_ops_impl.py", line 1875, in grayscale_to_rgb
    images = _AssertGrayscaleImage(images)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/image_ops_impl.py", line 262, in _AssertGrayscaleImage
    _CheckGrayscaleImage(image, require_static=False), image)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/ops/image_ops_impl.py", line 291, in _CheckGrayscaleImage
    raise ValueError('Last dimension of a grayscale image should be size 1.')
ValueError: Last dimension of a grayscale image should be size 1.

Can you share the training spec file?
More, are your training images 3 channels?

I modified the value of the dataloader:image_info:image:channel 3.
experiment_spec_pig.yaml (2.3 KB)

Are your training images 3 channels?
Also, please disable “pretrained_model_path” and retry.

I’m sure the training images are all 3 channels.
After deleting “pretrained_model_path”, the same error is still reported.

Hi,
Please use below workaround. No matter the dataset is 1 channel or 3 channels, please set channel:1 as below.

  image_info:
    image:
      channel: 1
      height: 224
      width: 224

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.