javiribera / locating-objects-without-bboxes

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

Runtime Error: An attempt has been made to start a new process before the current process has finished #47

Closed jaimeriverajorge closed 2 years ago

jaimeriverajorge commented 3 years ago

Hello, I am having the same issue as #9 and #11 , which were both closed due to inactivity. Is the only suggested solution to use this on a Unix machine? I am running this on Windows and currently do not have access to a Unix machine.

This the command that I used:
python -m object-locator.train --train-dir training --val-dir auto --epochs 100 --no-cuda --save lobes.ckpt --visdom-server http://localhost --visdom-port 8097 --visdom-env main

The full error message can be found here: https://pastebin.com/gvcTXYxV

I get the same error when trying to run locate.py with this command: python -m object-locator.locate --dataset mall_dataset --out output --model mall,lambdaa=1,BS=32,Adam,LR1e-4.ckpt --no-cuda

Lumcoin commented 3 years ago

Were you able to solve the issue? I am having the same problem...

sunjiacheng9 commented 2 years ago

Hello, I am having the same issue as #9 and #11 , which were both closed due to inactivity. Is the only suggested solution to use this on a Unix machine? I am running this on Windows and currently do not have access to a Unix machine.

This the command that I used: python -m object-locator.train --train-dir training --val-dir auto --epochs 100 --no-cuda --save lobes.ckpt --visdom-server http://localhost --visdom-port 8097 --visdom-env main

The full error message can be found here: https://pastebin.com/gvcTXYxV

I get the same error when trying to run locate.py with this command: python -m object-locator.locate --dataset mall_dataset --out output --model mall,lambdaa=1,BS=32,Adam,LR1e-4.ckpt --no-cuda

I think I got the answer.

Please add this code at Line 159"train.py" if name == 'main': and add the the TAB for remain codes.

Also, do the same at Line 180 "Locate.py"

Then, it was fixed.

Only Windows could have this issue.

javiribera commented 2 years ago

It looks to me like both train.py and locate.py would have to be wrapped around a if __name__ == "__main__": because they are meant to be run from the terminal. But I don't see why that would solve the issue.