Why do I report the following error when using this API
Closed this issue · 4 comments
My environment is Windows7,python3.6,TensorFlow 1.8.0
create image arrays test/imagecluster\images.pk
create image arrays test/imagecluster\images.pk
create image arrays test/imagecluster\images.pk
create image arrays test/imagecluster\images.pk
create image arrays test/imagecluster\images.pk
exitcode = _main(fd)
exitcode = _main(fd)
exitcode = _main(fd)
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
exitcode = _main(fd)
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
exitcode = _main(fd)
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 114, in _main
prepare(preparation_data)
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
prepare(preparation_data)
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
prepare(preparation_data)
prepare(preparation_data)
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
prepare(preparation_data)
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
_fixup_main_from_path(data['init_main_from_path'])
_fixup_main_from_path(data['init_main_from_path'])
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
_fixup_main_from_path(data['init_main_from_path'])
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 277, in _fixup_main_from_path
run_name="mp_main")
File "D:\Anaconda3\lib\runpy.py", line 263, in run_path
run_name="mp_main")
File "D:\Anaconda3\lib\runpy.py", line 263, in run_path
run_name="mp_main")
File "D:\Anaconda3\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "D:\Anaconda3\lib\runpy.py", line 96, in _run_module_code
run_name="mp_main")
File "D:\Anaconda3\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "D:\Anaconda3\lib\runpy.py", line 96, in _run_module_code
run_name="mp_main")
File "D:\Anaconda3\lib\runpy.py", line 263, in run_path
mod_name, mod_spec, pkg_name, script_name)
File "D:\Anaconda3\lib\runpy.py", line 85, in _run_code
pkg_name=pkg_name, script_name=fname)
File "D:\Anaconda3\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "D:\Anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
mod_name, mod_spec, pkg_name, script_name)
File "D:\Documents\Downloads\imagecluster-master\examples\example_api_minimal.py", line 10, in
File "D:\Anaconda3\lib\runpy.py", line 85, in _run_code
pkg_name=pkg_name, script_name=fname)
File "D:\Anaconda3\lib\runpy.py", line 96, in _run_module_code
images,fingerprints,timestamps = icio.get_image_data('test/')
File "D:\Documents\Downloads\imagecluster-master\imagecluster\io.py", line 252, in get_image_data
exec(code, run_globals)
exec(code, run_globals)
File "D:\Documents\Downloads\imagecluster-master\examples\example_api_minimal.py", line 10, in
File "D:\Documents\Downloads\imagecluster-master\examples\example_api_minimal.py", line 10, in
mod_name, mod_spec, pkg_name, script_name)
File "D:\Anaconda3\lib\runpy.py", line 85, in _run_code
images,fingerprints,timestamps = icio.get_image_data('test/')
images,fingerprints,timestamps = icio.get_image_data('test/')
File "D:\Documents\Downloads\imagecluster-master\imagecluster\io.py", line 252, in get_image_data
pkg_name=pkg_name, script_name=fname)
File "D:\Documents\Downloads\imagecluster-master\imagecluster\io.py", line 252, in get_image_data
File "D:\Anaconda3\lib\runpy.py", line 96, in _run_module_code
exec(code, run_globals)
File "D:\Documents\Downloads\imagecluster-master\examples\example_api_minimal.py", line 10, in
mod_name, mod_spec, pkg_name, script_name)
File "D:\Anaconda3\lib\runpy.py", line 85, in _run_code
images,fingerprints,timestamps = icio.get_image_data('test/')
File "D:\Documents\Downloads\imagecluster-master\imagecluster\io.py", line 252, in get_image_data
exec(code, run_globals)
File "D:\Documents\Downloads\imagecluster-master\examples\example_api_minimal.py", line 10, in
images,fingerprints,timestamps = icio.get_image_data('test/')
File "D:\Documents\Downloads\imagecluster-master\imagecluster\io.py", line 252, in get_image_data
images = read_images(imagedir, **img_kwds)
images = read_images(imagedir, **img_kwds)
images = read_images(imagedir, **img_kwds)
File "D:\Documents\Downloads\imagecluster-master\imagecluster\io.py", line 184, in read_images
images = read_images(imagedir, **img_kwds)
File "D:\Documents\Downloads\imagecluster-master\imagecluster\io.py", line 184, in read_images
images = read_images(imagedir, **img_kwds)
File "D:\Documents\Downloads\imagecluster-master\imagecluster\io.py", line 184, in read_images
File "D:\Documents\Downloads\imagecluster-master\imagecluster\io.py", line 184, in read_images
File "D:\Documents\Downloads\imagecluster-master\imagecluster\io.py", line 184, in read_images
with Pool(ncores) as pool:
with Pool(ncores) as pool:
with Pool(ncores) as pool:
File "D:\Anaconda3\lib\multiprocessing\context.py", line 119, in Pool
File "D:\Anaconda3\lib\multiprocessing\context.py", line 119, in Pool
File "D:\Anaconda3\lib\multiprocessing\context.py", line 119, in Pool
with Pool(ncores) as pool:
with Pool(ncores) as pool:
File "D:\Anaconda3\lib\multiprocessing\context.py", line 119, in Pool
File "D:\Anaconda3\lib\multiprocessing\context.py", line 119, in Pool
context=self.get_context())
context=self.get_context())
context=self.get_context())
File "D:\Anaconda3\lib\multiprocessing\pool.py", line 174, in init
File "D:\Anaconda3\lib\multiprocessing\pool.py", line 174, in init
File "D:\Anaconda3\lib\multiprocessing\pool.py", line 174, in init
context=self.get_context())
File "D:\Anaconda3\lib\multiprocessing\pool.py", line 174, in init
context=self.get_context())
File "D:\Anaconda3\lib\multiprocessing\pool.py", line 174, in init
self._repopulate_pool()
self._repopulate_pool()
File "D:\Anaconda3\lib\multiprocessing\pool.py", line 239, in _repopulate_pool
self._repopulate_pool()
File "D:\Anaconda3\lib\multiprocessing\pool.py", line 239, in _repopulate_pool
File "D:\Anaconda3\lib\multiprocessing\pool.py", line 239, in _repopulate_pool
self._repopulate_pool()
File "D:\Anaconda3\lib\multiprocessing\pool.py", line 239, in _repopulate_pool
self._repopulate_pool()
File "D:\Anaconda3\lib\multiprocessing\pool.py", line 239, in _repopulate_pool
w.start()
File "D:\Anaconda3\lib\multiprocessing\process.py", line 105, in start
w.start()
File "D:\Anaconda3\lib\multiprocessing\process.py", line 105, in start
w.start()
File "D:\Anaconda3\lib\multiprocessing\process.py", line 105, in start
w.start()
File "D:\Anaconda3\lib\multiprocessing\process.py", line 105, in start
w.start()
File "D:\Anaconda3\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "D:\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
self._popen = self._Popen(self)
self._popen = self._Popen(self)
self._popen = self._Popen(self)
File "D:\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
File "D:\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
File "D:\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
self._popen = self._Popen(self)
File "D:\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
return Popen(process_obj)
return Popen(process_obj)
File "D:\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in init
return Popen(process_obj)
File "D:\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in init
File "D:\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in init
File "D:\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in init
return Popen(process_obj)
File "D:\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 33, in init
prep_data = spawn.get_preparation_data(process_obj._name)
prep_data = spawn.get_preparation_data(process_obj._name)
prep_data = spawn.get_preparation_data(process_obj._name)
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
prep_data = spawn.get_preparation_data(process_obj._name)
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
prep_data = spawn.get_preparation_data(process_obj._name)
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 143, in get_preparation_data
_check_not_importing_main()
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
_check_not_importing_main()
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
_check_not_importing_main()
File "D:\Anaconda3\lib\multiprocessing\spawn.py", line 136, in _check_not_importing_main
_check_not_importing_main()
File "D:\Anaconda3\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.
is not going to be frozen to produce an executable.''')
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.
Would you mind elaborating on what you tried to run exactly?
- I created a PICS folder in my examples and put in some.jpg files.
- I changed the get_model() weight address in calc.py to this:
base_model = VGG16(weights=r'D:\Documents\Downloads\imagecluster-master\vgg16_weights_tf_dim_ordering_tf_kernels.h5', include_top=True)
I can use
base_model = VGG16(weights='/home/elcorto/.keras/model/vgg16_weights_tf_dim_ordering_tf_kernels.h5', include_top=True)
just fine.
I'm not on Windows and I don't use conda, but in any case, make sure to run the tests first, e.g.
$ pytest /path/to/imagecluster/imagecluster/tests/tests.py
to ensure your environment is ok.
Close due to inactive OP.