Skip to content

Commit

Permalink
[Fix]: fix deadlock in multi-process evaluation (#52)
Browse files Browse the repository at this point in the history
* debug for issue #45

* push for lint
  • Loading branch information
DangChuong-DC authored Mar 2, 2022
1 parent 15f3d46 commit 583ab82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mmrotate/datasets/dota.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 583ab82

Please sign in to comment.