From dbc441e68bc989cb744f2f50c30f5605d6b9809b Mon Sep 17 00:00:00 2001 From: Sam <11160433+svbeuningen@users.noreply.github.com> Date: Thu, 1 Jul 2021 13:22:25 +0200 Subject: [PATCH 1/4] Fixed parellel mode for keras 2.2.5 --- mrcnn/parallel_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mrcnn/parallel_model.py b/mrcnn/parallel_model.py index d2bf53bb88..b1a2b2874b 100644 --- a/mrcnn/parallel_model.py +++ b/mrcnn/parallel_model.py @@ -32,6 +32,7 @@ def __init__(self, keras_model, gpu_count): keras_model: The Keras model to parallelize gpu_count: Number of GPUs. Must be > 1 """ + super(ParallelModel, self).__init__() self.inner_model = keras_model self.gpu_count = gpu_count merged_outputs = self.make_parallel() From 39ba08460858fd8bde8ba7030636715da3539d49 Mon Sep 17 00:00:00 2001 From: Sam <11160433+svbeuningen@users.noreply.github.com> Date: Thu, 1 Jul 2021 13:55:54 +0200 Subject: [PATCH 2/4] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7ccc97a8b6..e7c343af81 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def _parse_requirements(file_path): setup( name='mask-rcnn', - version='2.1', + version='2.1.1', url='https://github.com/matterport/Mask_RCNN', author='Matterport', author_email='waleed.abdulla@gmail.com', From 93b88212e5f3bc738c6a87c6fe5b69fc92e7b260 Mon Sep 17 00:00:00 2001 From: Sam <11160433+svbeuningen@users.noreply.github.com> Date: Mon, 7 Mar 2022 16:24:36 +0100 Subject: [PATCH 3/4] Update model.py For for https://github.com/keras-team/keras/issues/8595 --- mrcnn/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mrcnn/model.py b/mrcnn/model.py index 62cb2b0951..e8ff274f7a 100644 --- a/mrcnn/model.py +++ b/mrcnn/model.py @@ -2274,7 +2274,7 @@ def set_log_dir(self, model_path=None): "*epoch*", "{epoch:04d}") def train(self, train_dataset, val_dataset, learning_rate, epochs, layers, - augmentation=None, custom_callbacks=None, no_augmentation_sources=None): + workers=multiprocessing.cpu_count(), use_multiprocessing=True, augmentation=None, custom_callbacks=None, no_augmentation_sources=None): """Train the model. train_dataset, val_dataset: Training and validation Dataset objects. learning_rate: The learning rate to train with @@ -2359,7 +2359,7 @@ def train(self, train_dataset, val_dataset, learning_rate, epochs, layers, if os.name is 'nt': workers = 0 else: - workers = multiprocessing.cpu_count() + workers = workers self.keras_model.fit_generator( train_generator, @@ -2371,7 +2371,7 @@ def train(self, train_dataset, val_dataset, learning_rate, epochs, layers, validation_steps=self.config.VALIDATION_STEPS, max_queue_size=100, workers=workers, - use_multiprocessing=True, + use_multiprocessing=use_multiprocessing, ) self.epoch = max(self.epoch, epochs) From 9326bc6a2d94e9aae56ce72956ec0c7762c9c985 Mon Sep 17 00:00:00 2001 From: Sam <11160433+svbeuningen@users.noreply.github.com> Date: Mon, 7 Mar 2022 16:32:31 +0100 Subject: [PATCH 4/4] Update setup.py Increased version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e7c343af81..ac2be76d8d 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def _parse_requirements(file_path): setup( name='mask-rcnn', - version='2.1.1', + version='2.1.2', url='https://github.com/matterport/Mask_RCNN', author='Matterport', author_email='waleed.abdulla@gmail.com',