Hi,
I wanna run pretreatment.py to align and crop the dataset. I have downloaded CASIA_B (http://www.cbsr.ia.ac.cn/english/Gait%20Databases.asp) dataset and after installing pytorch4, cuda9,scipy and cv2(conda open-cv) I set the running code like this two path 1-(python pretreatment.py --input_path='CASIA-B' --output_path='output1') and 2(python pretreatment.py --input_path=CASIA-B --output_path=output1) but I got different error for each one as bellow:
1-
Pretreatment Start.
Input path: 'CASIA-B'
Output path: 'output1'
Log file: ./pretreatment.log
Worker num: 1
Traceback (most recent call last):
File "pretreatment.py", line 160, in
id_list = os.listdir(INPUT_PATH)
FileNotFoundError: [WinError 3] The system cannot find the path specified: "'CASIA-B'"
2-
Pretreatment Start.
Input path: CASIA-B
Output path: output1
Log file: ./pretreatment.log
Worker num: 1
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\spawn.py", line 114, in _main
prepare(preparation_data)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\spawn.py", line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
run_name="mp_main")
File "C:\Users\b\Anaconda3\envs\gaitset\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "E:\b-Thesis\exist-project\Gait\GaitSet\GaitSet-master\pretreatment.py", line 149, in
pool = Pool(WORKERS)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\context.py", line 119, in Pool
context=self.get_context())
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\pool.py", line 174, in init
self._repopulate_pool()
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\pool.py", line 239, in _repopulate_pool
w.start()
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\popen_spawn_win32.py", line 33, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
_check_not_importing_main()
File "C:\Users\b\Anaconda3\envs\gaitset\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.
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\spawn.py", line 114, in _main
prepare(preparation_data)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\spawn.py", line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
run_name="mp_main")
File "C:\Users\b\Anaconda3\envs\gaitset\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "E:\b-Thesis\exist-project\Gait\GaitSet\GaitSet-master\pretreatment.py", line 149, in
pool = Pool(WORKERS)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\context.py", line 119, in Pool
context=self.get_context())
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\pool.py", line 174, in init
self._repopulate_pool()
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\pool.py", line 239, in _repopulate_pool
w.start()
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\popen_spawn_win32.py", line 33, in init
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\Users\b\Anaconda3\envs\gaitset\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
_check_not_importing_main()
File "C:\Users\b\Anaconda3\envs\gaitset\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()
...
**So for second condition its continuously going and makes same folders as dataset in output folder but without any pictures(it doesn't show photo to do aligning).
Does anybody or Arthurs know how to fix it.
Thank you and I'm sorry if it is basic and simple problem.**