From 60dfa9a2993fe4b4d8273f20576e52ee2ad55ee6 Mon Sep 17 00:00:00 2001 From: DC Date: Wed, 2 Mar 2022 16:11:30 +0900 Subject: [PATCH 1/2] debug for issue #45 --- mmrotate/datasets/dota.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mmrotate/datasets/dota.py b/mmrotate/datasets/dota.py index d05fb3f17..f34ee663a 100644 --- a/mmrotate/datasets/dota.py +++ b/mmrotate/datasets/dota.py @@ -8,7 +8,7 @@ import zipfile from collections import defaultdict from functools import partial -from multiprocessing import Pool +from multiprocessing import get_context import mmcv import numpy as np @@ -380,7 +380,7 @@ def eval_map(det_results, area_ranges = ([(rg[0]**2, rg[1]**2) for rg in scale_ranges] if scale_ranges is not None else None) - pool = Pool(nproc) + pool = get_context("spawn").Pool(nproc) eval_results = [] for i in range(num_classes): # get gt and det bboxes of this class From 3b56869f155d72c7eeaf3434fc277740f644d896 Mon Sep 17 00:00:00 2001 From: DC Date: Wed, 2 Mar 2022 17:27:04 +0900 Subject: [PATCH 2/2] push for lint --- mmrotate/datasets/dota.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmrotate/datasets/dota.py b/mmrotate/datasets/dota.py index f34ee663a..dac5df710 100644 --- a/mmrotate/datasets/dota.py +++ b/mmrotate/datasets/dota.py @@ -380,7 +380,7 @@ def eval_map(det_results, area_ranges = ([(rg[0]**2, rg[1]**2) for rg in scale_ranges] if scale_ranges is not None else None) - pool = get_context("spawn").Pool(nproc) + pool = get_context('spawn').Pool(nproc) eval_results = [] for i in range(num_classes): # get gt and det bboxes of this class