logo
Loading...

使用Superpixels 的參數出現錯誤 - Cupoy

在HW Part2的部分,為什麼只要有這行就會出錯??? 沒有他反而能跑呢???# convert ...

cvdl-1,cvdl-1-d16, convert, Image,畫出來, move, If

使用Superpixels 的參數出現錯誤

2019/12/17 03:29 PM
電腦視覺深度學習論壇
Kent
觀看數:0
回答數:1
收藏數:0
cvdl-1
cvdl-1-d16
convert
Image
畫出來
move
If

在HW Part2的部分,為什麼只要有這行就會出錯??? 沒有他反而能跑呢???

# convert images into their superpixel representation

sometimes(iaa.Superpixels(p_replace=(0, 1.0), n_segments=(20, 200))),


錯誤訊息如下:

ValueError                                Traceback (most recent call last)
<ipython-input-14-985d6a3d1dc3> in <module>
    45
    46
---> 47 images_aug = seq.augment_images(img_combine) ## Image Augmentation
    48
    49 ##畫出來

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\meta.py in augment_images(self, images, parents, hooks)
   693                         random_state=self.random_state,
   694                         parents=parents,
--> 695                         hooks=hooks
   696                     )
   697                     # move "forward" the random state, so that the next call to

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\meta.py in _augment_images(self, images, random_state, parents, hooks)
  2959     def _augment_images(self, images, random_state, parents, hooks):
  2960         return self._augment_augmentables(
-> 2961             images, random_state, parents, hooks, "augment_images")
  2962
  2963     def _augment_heatmaps(self, heatmaps, random_state, parents, hooks):

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\meta.py in _augment_augmentables(self, augmentables, random_state, parents, hooks, augfunc_name)
  2993                     augmentables,
  2994                     parents=parents + [self],
-> 2995                     hooks=hooks
  2996                 )
  2997         return augmentables

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\meta.py in augment_images(self, images, parents, hooks)
   631                     random_state=self.random_state,
   632                     parents=parents,
--> 633                     hooks=hooks
   634                 )
   635                 # move "forward" the random state, so that the next call to

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\meta.py in _augment_images(self, images, random_state, parents, hooks)
  3569
  3570         result = self._augment_augmentables(images, random_state,
-> 3571                                             parents, hooks, _augfunc)
  3572
  3573         # If input was a list, keep the output as a list too,

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\meta.py in _augment_augmentables(self, augmentables, random_state, parents, hooks, func)
  3643                 result_list = func(
  3644                     augmenters,
-> 3645                     augmentables_this_list, parents + [self], hooks
  3646                 )
  3647

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\meta.py in _augfunc(augs_, augmentables_, parents_, hooks_)
  3566
  3567         def _augfunc(augs_, augmentables_, parents_, hooks_):
-> 3568             return augs_.augment_images(augmentables_, parents_, hooks_)
  3569
  3570         result = self._augment_augmentables(images, random_state,

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\meta.py in augment_images(self, images, parents, hooks)
   631                     random_state=self.random_state,
   632                     parents=parents,
--> 633                     hooks=hooks
   634                 )
   635                 # move "forward" the random state, so that the next call to

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\meta.py in _augment_images(self, images, random_state, parents, hooks)
  2959     def _augment_images(self, images, random_state, parents, hooks):
  2960         return self._augment_augmentables(
-> 2961             images, random_state, parents, hooks, "augment_images")
  2962
  2963     def _augment_heatmaps(self, heatmaps, random_state, parents, hooks):

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\meta.py in _augment_augmentables(self, augmentables, random_state, parents, hooks, augfunc_name)
  2993                     augmentables,
  2994                     parents=parents + [self],
-> 2995                     hooks=hooks
  2996                 )
  2997         return augmentables

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\meta.py in augment_images(self, images, parents, hooks)
   631                     random_state=self.random_state,
   632                     parents=parents,
--> 633                     hooks=hooks
   634                 )
   635                 # move "forward" the random state, so that the next call to

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\augmenters\segmentation.py in _augment_images(self, images, random_state, parents, hooks)
   232                                      "float16", "float32", "float64",
   233                                      "float96", "float128", "float256"],
--> 234                          augmenter=self)
   235
   236         nb_images = len(images)

~\Anaconda3\envs\tensorflow\lib\site-packages\imgaug\dtypes.py in gate_dtypes(dtypes, allowed, disallowed, augmenter)
   326                         augmenter.name,
   327                         augmenter.__class__.__name__,
--> 328                         ", ".join(disallowed)
   329                     ))
   330         else:

ValueError: Got dtype 'float32' in augmenter 'UnnamedSuperpixels' (class 'Superpixels'), which is a forbidden dtype (uint128, uint256, int128, int256, float16, float32, float64, float96, float128, float256).