|
|
@@ -134,8 +134,7 @@ class Seg:
|
|
|
self.label_value_list[id] = unique
|
|
|
self.label_value_num_list[id] = counts
|
|
|
|
|
|
- def _get_clipped_mean_std(self, start, end, clip_min_value,
|
|
|
- clip_max_value):
|
|
|
+ def _get_clipped_mean_std(self, start, end, clip_min_value, clip_max_value):
|
|
|
for id in range(start, end):
|
|
|
full_path_im, full_path_label = self.file_list[id]
|
|
|
image, label = Compose.decode_image(full_path_im, full_path_label)
|
|
|
@@ -158,9 +157,9 @@ class Seg:
|
|
|
self.im_std_list = [[] for i in range(len(self.file_list))]
|
|
|
self.im_value_list = [[] for i in range(len(self.file_list))]
|
|
|
self.im_value_num_list = [[] for i in range(len(self.file_list))]
|
|
|
- self.im_height_list = np.zeros(len(self.file_list), dtype='int32')
|
|
|
- self.im_width_list = np.zeros(len(self.file_list), dtype='int32')
|
|
|
- self.im_channel_list = np.zeros(len(self.file_list), dtype='int32')
|
|
|
+ self.im_height_list = np.zeros(len(self.file_list), dtype='int64')
|
|
|
+ self.im_width_list = np.zeros(len(self.file_list), dtype='int64')
|
|
|
+ self.im_channel_list = np.zeros(len(self.file_list), dtype='int64')
|
|
|
self.label_value_list = [[] for i in range(len(self.file_list))]
|
|
|
self.label_value_num_list = [[] for i in range(len(self.file_list))]
|
|
|
|
|
|
@@ -171,8 +170,7 @@ class Seg:
|
|
|
start = one_worker_file * i
|
|
|
end = one_worker_file * (
|
|
|
i + 1) if i < num_workers - 1 else len(self.file_list)
|
|
|
- t = threading.Thread(
|
|
|
- target=self._get_image_info, args=(start, end))
|
|
|
+ t = threading.Thread(target=self._get_image_info, args=(start, end))
|
|
|
threads.append(t)
|
|
|
for t in threads:
|
|
|
t.start()
|