shaunyuan22 / SODA-mmrotate

SODA-A Small Object Detection Toolbox and Benchmark
https://shaunyuan22.github.io/SODA/
Apache License 2.0
37 stars 6 forks source link

After one round of training, during the Running per image evaluation..., a MemoryError error occurs. #11

Closed GDragon986 closed 11 months ago

GDragon986 commented 1 year ago

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

master branch https://github.com/open-mmlab/mmrotate

Environment

sys.platform: win32 Python: 3.8.17 (default, Jul 5 2023, 20:44:21) [MSC v.1916 64 bit (AMD64)] CUDA available: True GPU 0: NVIDIA GeForce RTX 2060 SUPER CUDA_HOME: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3 NVCC: Cuda compilation tools, release 11.3, V11.3.58 MSVC: 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.16.27049 版 GCC: n/a PyTorch: 1.12.1 PyTorch compiling details: PyTorch built with:

TorchVision: 0.13.1 OpenCV: 4.8.0 MMCV: 1.5.3 MMCV Compiler: MSVC 191627049 MMCV CUDA Compiler: 11.3 MMRotate: 0.3.3+04da23d

Reproduces the problem - code sample

python tools/train.py configs/sodaa-benchmarks/rotated_faster_rcnn_r50_fpn_1x.py

Reproduces the problem - command or script

python tools/train.py configs/sodaa-benchmarks/rotated_faster_rcnn_r50_fpn_1x.py

Reproduces the problem - error message

Running per image evaluation... Traceback (most recent call last): File "tools/train.py", line 192, in main() File "tools/train.py", line 181, in main train_detector( File "f:\codes\soda-mmrotate\mmrotate\apis\train.py", line 141, in train_detector runner.run(data_loaders, cfg.workflow) File "F:\VirtualEnvironment\SODA_A\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 130, in run epoch_runner(data_loaders[i], **kwargs) File "F:\VirtualEnvironment\SODA_A\lib\site-packages\mmcv\runner\epoch_based_runner.py", line 56, in train self.call_hook('after_train_epoch') File "F:\VirtualEnvironment\SODA_A\lib\site-packages\mmcv\runner\base_runner.py", line 309, in call_hook getattr(hook, fn_name)(self) File "F:\VirtualEnvironment\SODA_A\lib\site-packages\mmcv\runner\hooks\evaluation.py", line 267, in after_train_epoch self._do_evaluate(runner) File "F:\VirtualEnvironment\SODA_A\lib\site-packages\mmdet\core\evaluation\eval_hooks.py", line 63, in _do_evaluate key_score = self.evaluate(runner, results) File "F:\VirtualEnvironment\SODA_A\lib\site-packages\mmcv\runner\hooks\evaluation.py", line 363, in evaluate eval_res = self.dataloader.dataset.evaluate( File "f:\codes\soda-mmrotate\mmrotate\datasets\sodaa.py", line 447, in evaluate SODAAEval.evaluate() File "f:\codes\soda-mmrotate\mmrotate\datasets\sodaa_eval\sodaa_eval.py", line 199, in evaluate contents = pool.map(evaluateImgFunc, File "F:\VirtualEnvironment\SODA_A\lib\multiprocessing\pool.py", line 364, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "F:\VirtualEnvironment\SODA_A\lib\multiprocessing\pool.py", line 771, in get raise self._value File "F:\VirtualEnvironment\SODA_A\lib\multiprocessing\pool.py", line 537, in _handle_tasks put(task) File "F:\VirtualEnvironment\SODA_A\lib\multiprocessing\connection.py", line 206, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "F:\VirtualEnvironment\SODA_A\lib\multiprocessing\reduction.py", line 51, in dumps cls(buf, protocol).dump(obj) MemoryError

Additional information

No response

shaunyuan22 commented 11 months ago

have a try on closing multi-processing by setting self.nproc in sodaa_eval.py with 0