computer-animation-perception-group/sEMG-based-mvcnn

unable to run the code, facing the following issue

Opened this issue · 3 comments

Dear CAPG Team
I have executed code as per readme file but landing with following errors. Could you please help me identify the issue and execute the code.

libdc1394 error: Failed to initialize libdc1394
[2021-01-08 11:59:38.943939] INFO: sigr: Args:
{'adabn': False,
'amplitude_weighting': False,
'balance_gesture': 1.0,
'bandstop': False,
'batch_size': 1000,
'bng': False,
'confuse_all': False,
'confuse_conv': False,
'conv_shortcut': False,
'crossval_type': 'universal-one-fold-intra-subject',
'dataset': 'ninapro-db1',
'decay_all': True,
'dense_window': True,
'downsample': 0,
'drop_branch': False,
'drop_conv': False,
'drop_pixel': (-1,),
'drop_presnet': False,
'drop_presnet_branch': False,
'drop_presnet_proj': False,
'dropout': 0.5,
'dual_stream': False,
'fast_pixel_reduce': True,
'faug': 0.0,
'faug_classwise': False,
'fft': False,
'fft_append': False,
'fix_params': (),
'fold': 0,
'gamma': 10.0,
'gpu': (0,),
'gpu_x': 0,
'ignore_params': (),
'lambda_scale': 1.0,
'log': '.cache/srep-ninapro-db1-universal-one-fold-intra-subject/log',
'lr': 0.1,
'lr_factor': (),
'lr_step': (16, 24),
'lstm': False,
'lstm_bn': True,
'lstm_dropout': 0.0,
'lstm_grad_scale': True,
'lstm_last': 0,
'lstm_shortcut': False,
'lstm_window': None,
'minibatch': False,
'module': 'convnet',
'num_adabn_epoch': 1,
'num_bottleneck': 128,
'num_conv': 2,
'num_epoch': 28,
'num_eval_epoch': 1,
'num_feature_block': 2,
'num_filter': 64,
'num_gesture_block': 0,
'num_hidden': 512,
'num_lstm_hidden': 128,
'num_lstm_layer': 1,
'num_pixel': 2,
'num_pixel_reduce_filter': (None, None),
'num_presnet': (),
'num_revgrad_batch': 2,
'num_semg_col': 10,
'num_semg_row': 1,
'num_subject_block': 0,
'num_tzeng_batch': 2,
'params': None,
'pixel_reduce_bias': False,
'pixel_reduce_kernel': (1, 1),
'pixel_reduce_loss_weight': 0.0,
'pixel_reduce_norm': False,
'pixel_reduce_pad': (0, 0),
'pixel_reduce_reg_out': False,
'pixel_reduce_stride': (1, 1),
'pixel_same_init': False,
'pool': False,
'preprocess': NinaProLowpass(),
'presnet_branch': (),
'presnet_dense': False,
'presnet_proj_type': 'A',
'presnet_promote': False,
'random_bad_channel': (),
'random_scale': 0.0,
'random_shift_fill': 'zero',
'random_shift_horizontal': 0,
'random_shift_vertical': 0,
'revgrad': False,
'root': '.cache/srep-ninapro-db1-universal-one-fold-intra-subject',
'snapshot': '.cache/srep-ninapro-db1-universal-one-fold-intra-subject/model',
'snapshot_period': 28,
'subject_confusion_loss_weight': 1.0,
'subject_loss_weight': 1.0,
'subject_wd': None,
'tzeng': False,
'wd': 0.0001,
'window': 1,
'zscore': True,
'zscore_bng': False}
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/code/sigr/app.py", line 752, in
cli(obj=Bunch())
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 27, in new_func
return f(get_current_context().obj, *args, **kwargs)
File "sigr/utils/init.py", line 101, in wrapped
return func(ctx_or_args, **kargs)
File "/code/sigr/app.py", line 186, in crossval
random_shift_vertical=args.random_shift_vertical
File "sigr/data/init.py", line 236, in get_universal_one_fold_intra_subject_data
shuffle=True)
File "sigr/data/init.py", line 325, in get_data
trial = get_trial(root=root, combo=combo)
File "sigr/data/ninapro/init.py", line 68, in call
zip(paths, _get_data(paths, self.preprocess))})
File "/usr/local/lib/python2.7/dist-packages/joblib/memory.py", line 483, in call
return self._cached_call(args, kwargs)[0]
File "/usr/local/lib/python2.7/dist-packages/joblib/memory.py", line 430, in _cached_call
out, metadata = self.call(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/joblib/memory.py", line 675, in call
output = self.func(*args, **kwargs)
File "sigr/data/ninapro/init.py", line 80, in _get_data
return [_get_data_aux(path, preprocess) for path in paths]
File "sigr/data/ninapro/init.py", line 84, in _get_data_aux
data = sio.loadmat(path)['data'].astype(np.float32)
File "/usr/lib/python2.7/dist-packages/scipy/io/matlab/mio.py", line 125, in loadmat
MR = mat_reader_factory(file_name, appendmat, **kwargs)
File "/usr/lib/python2.7/dist-packages/scipy/io/matlab/mio.py", line 54, in mat_reader_factory
byte_stream = _open_file(file_name, appendmat)
File "/usr/lib/python2.7/dist-packages/scipy/io/matlab/mio.py", line 28, in _open_file
raise IOError(e)
IOError: [Errno 2] No such file or directory: '/code/.cache/ninapro-db1/data/000/001/000_001_000.mat'
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.
libdc1394 error: Failed to initialize libdc1394
Usage: app.py exp [OPTIONS] COMMAND [ARGS]...

Error: Invalid value for "--params": Path ".cache/srep-ninapro-db1-universal-one-fold-intra-subject/model-0028.params" does not exist.

Hello,have you solved the above problems ?

I now encounter such problems. Does this feature extraction need to be processed by matlab ? How did you solve it?

NinaPro feature map generation, use window = 20 frames, stride = 1 frames
joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 39, in _open_file
return open(file_like, mode), True
FileNotFoundError: [Errno 2] No such file or directory: 'D:/SEMG/mvcnn/sigr/data/ninapro-db2/data/000/000/000_000_000.mat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 436, in _proces
s_worker
r = call_item()
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/joblib/externals/loky/process_executor.py", line 288, in _call
_
return self.fn(*self.args, **self.kwargs)
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/joblib/_parallel_backends.py", line 595, in call
return self.func(*args, **kwargs)
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/joblib/parallel.py", line 263, in call
for func, args, kwargs in self.items]
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/joblib/parallel.py", line 263, in
for func, args, kwargs in self.items]
File "NINAPRODB2-feature-extraction.py", line 177, in emg_feature_extraction_parallel_2
data = sio.loadmat(in_path)['data'].astype(np.float32)
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 222, in loadmat
with _open_file_context(file_name, appendmat) as f:
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/contextlib.py", line 81, in enter
return next(self.gen)
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 17, in _open_file_context
f, opened = _open_file(file_like, appendmat, mode)
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/scipy/io/matlab/mio.py", line 45, in _open_file
return open(file_like, mode), True
FileNotFoundError: [Errno 2] No such file or directory: 'D:/SEMG/mvcnn/sigr/data/ninapro-db2/data/000/000/000_000_000.mat'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "NINAPRODB2-feature-extraction.py", line 233, in
Parallel(n_jobs=8)(delayed(emg_feature_extraction_parallel_2)(input_path, output_path, combo, feature_list) for combo in combos)
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/joblib/parallel.py", line 1056, in call
self.retrieve()
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/joblib/parallel.py", line 935, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/site-packages/joblib/_parallel_backends.py", line 542, in wrap_future_result
return future.result(timeout=timeout)
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/concurrent/futures/_base.py", line 432, in result
return self.__get_result()
File "/home/server419/miniconda3/envs/xtt/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
raise self._exception
FileNotFoundError: [Errno 2] No such file or directory: 'D:/SEMG/mvcnn/sigr/data/ninapro-db2/data/000/000/000_000_000.mat'

No i couldn't solve the issue