javiribera / locating-objects-without-bboxes

PyTorch code for "Locating objects without bounding boxes" - Loss function and trained models
Other
249 stars 52 forks source link

Any suggestions for this problem #9

Closed hustcc19860606 closed 4 years ago

hustcc19860606 commented 4 years ago

(object-locator) D:\2019\wildandfields\Locating Objects Without Bounding Boxes\locating-objects-without-bboxes-master>python -m object-locator.locate --dataset 20160613_F54_validation --out output --model "checkpoints\plants_20160613F54,BS=32,Adam,LR1e-5,p=-1.ckpt" --evaluate --no-gpu --radii 5 Loading checkpoint... _ loaded checkpoint 'checkpoints\plants_20160613F54,BS=32,Adam,LR1e-5,p=-1.ckpt' with 64.8M trainable parameters DONE (took 3.866121 seconds) Loading checkpoint... _ loaded checkpoint 'checkpoints\plants_20160613_F54,BS=32,Adam,LR1e-5,p=-1.ckpt' with 64.8M trainable parameters DONE (took 3.257291 seconds) Traceback (most recent call last): Traceback (most recent call last): File "", line 1, in File "D:\sofewarespace\envs\object-locator\lib\runpy.py", line 193, in _run_module_as_main File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\spawn.py", line 105, in spawn_main "main", mod_spec) File "D:\sofewarespace\envs\object-locator\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\2019\wildandfields\Locating Objects Without Bounding Boxes\locating-objects-without-bboxes-master\object-locator\locate.py", line 186, in exitcode = _main(fd) File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\spawn.py", line 114, in _main prepare(preparation_data) File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\spawn.py", line 223, in prepare _fixup_main_from_name(data['init_main_from_name']) File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\spawn.py", line 249, in _fixup_main_from_name alter_sys=True)for batch_idx, (imgs, dictionaries) in tqdm(enumerate(testset_loader),

File "D:\sofewarespace\envs\object-locator\lib\runpy.py", line 205, in run_module File "D:\sofewarespace\envs\object-locator\lib\site-packages\torch\utils\data\dataloader.py", line 819, in iter return _run_module_code(code, init_globals, run_name, mod_spec) File "D:\sofewarespace\envs\object-locator\lib\runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "D:\sofewarespace\envs\object-locator\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\2019\wildandfields\Locating Objects Without Bounding Boxes\locating-objects-without-bboxes-master\object-locator\locate.py", line 186, in return _DataLoaderIter(self) for batch_idx, (imgs, dictionaries) in tqdm(enumerate(testset_loader), File "D:\sofewarespace\envs\object-locator\lib\site-packages\torch\utils\data\dataloader.py", line 560, in init File "D:\sofewarespace\envs\object-locator\lib\site-packages\torch\utils\data\dataloader.py", line 819, in iter w.start()return _DataLoaderIter(self)

File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\process.py", line 105, in start File "D:\sofewarespace\envs\object-locator\lib\site-packages\torch\utils\data\dataloader.py", line 560, in init w.start() File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\process.py", line 105, in start self._popen = self._Popen(self)self._popen = self._Popen(self)

File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\context.py", line 223, in _Popen File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\context.py", line 223, in _Popen return _default_context.get_context().Process._Popen(process_obj)return _default_context.get_context().Process._Popen(process_obj)

File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\context.py", line 322, in _Popen File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\context.py", line 322, in _Popen return Popen(process_obj) return Popen(process_obj) File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\popen_spawn_win32.py", line 33, in init

File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\popen_spawn_win32.py", line 65, in init reduction.dump(process_obj, to_child)prep_data = spawn.get_preparation_data(process_obj._name)

File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\reduction.py", line 60, in dump File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\spawn.py", line 143, in get_preparation_data _check_not_importing_main() File "D:\sofewarespace\envs\object-locator\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main is not going to be frozen to produce an executable.''') RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.
ForkingPickler(file, protocol).dump(obj)

BrokenPipeError: [Errno 32] Broken pipe

javiribera commented 4 years ago

Funny I cannot reproduce this error. I am not getting the same error when I run your command. But it seems you are running this on Windows. Could you try this on Ubuntu and let me know if you get the same error?

Also I am surprised to see the line "Loading checkpoint..." twice.

javiribera commented 4 years ago

Also try running the same with

--tau -1

If you don't specify anything it tryes a lot of different taus, which may make your non-GPU machine go really slow. It should work first with a single tau.

javiribera commented 4 years ago

Closing due to inactivity. Feel free to reopen if still experiencing the issue, but provide all the information requested here.