Closed IslamFadl closed 4 years ago
Yes, probably you are right.
It seems demos/instance_occlsegm/examples/instance_occlsegm/semantic_segmentation/view_dataset.py
is missing, which is written in https://github.com/start-jsk/jsk_apc/tree/master/demos/instance_occlsegm#without-ros
https://github.com/start-jsk/jsk_apc/tree/master/demos/instance_occlsegm/examples/instance_occlsegm/semantic_segmentation
However, it seems it is just a typo, and we can run it with occlusion_segmentation
instead of semantic_segmentation
# Dataset for semantic (image-level) occlusion segmentation
cd examples/instance_occlsegm/instance_segmentation
./view_dataset.py
@wkentaro am I right?
Yes, this is a typo ー I sent a fix here: https://github.com/start-jsk/jsk_apc/pull/2728 Thanks for catching and answering this, both!
Please also note that both files "view_dataset.py" , in the README.md ,need another two lines of code: _import sys sys.path.insert(1, '/home/student2/PycharmProjects/masterproject/relook/jsk_apc/demos/instanceocclsegm')
in order to execute the following line: from instance_occlsegm_lib.contrib import instance_occlsegm
otherwise a Module not found error appears and it cannot fetch the /_instanceocclsegm dir
I suggest it as a temporary solutions, it is not the best style to circumvent the problem, but it works. Otherwise better structure of the code in this file would be needed.
Thank you very much for confirming.
Please also note that both files "view_dataset.py" , in the README.md ,need another two lines of code: import sys sys.path.insert(1, '/home/student2/PycharmProjects/masterproject/relook/jsk_apc/demos/instance_occlsegm')
if you build this package with catkin build
, you don't need to set the path because it is ROS package.
but if you want to try it without ROS, you need.
Oh, that's why. I actually didn't install ROS and attempted the 'without ROS' examples thinking it would not affect the code.
Thanks a lot.
Or you can run make install
in instance_occlsegm
and build conda environment without ROS.
https://github.com/start-jsk/jsk_apc/blob/master/demos/instance_occlsegm/Makefile
After running make install
in instance_occlsegm
directory, and as in the sequence of the readme file, I followed by these two commands:
$ cd examples/instance_occlsegm/panoptic_occlusion_segmentation
$ ./train.py --gpu 0 --notrain pix # instnce-only
And I got this error:
# -----------------------------------------------------------------------------
{'anchor_scales': (4, 8, 16, 32),
'batch_size': 1,
'class_names': ['avery_binder',
'balloons',
'band_aid_tape',
'bath_sponge',
'black_fashion_gloves',
'burts_bees_baby_wipes',
'colgate_toothbrush_4pk',
'composition_book',
'crayons',
'duct_tape',
'epsom_salts',
'expo_eraser',
'fiskars_scissors',
'flashlight',
'glue_sticks',
'hand_weight',
'hanes_socks',
'hinged_ruled_index_cards',
'ice_cube_tray',
'irish_spring_soap',
'laugh_out_loud_jokes',
'marbles',
'measuring_spoons',
'mesh_cup',
'mouse_traps',
'pie_plates',
'plastic_wine_glass',
'poland_spring_water',
'reynolds_wrap',
'robots_dvd',
'robots_everywhere',
'scotch_sponges',
'speed_stick',
'table_cloth',
'tennis_ball_container',
'ticonderoga_pencils',
'tissue_box',
'toilet_brush',
'white_facecloth',
'windex'],
'dataset': 'occlusion',
'git_hash': '6ed93840',
'gpu': 0,
'hostname': 'BQ-DX1100-CT',
'lr': 0.00125,
'lr_base': 0.00125,
'mask_loss': 'softmax',
'max_epoch': 120,
'max_size': 1000,
'min_size': 600,
'model': 'resnet50',
'multi_node': False,
'n_gpu': 1,
'n_node': 1,
'noaugmentation': False,
'notrain': 'pix',
'out': '/home/student2/PycharmProjects/masterproject/relook/jsk_apc/demos/instance_occlsegm/examples/instance_occlsegm/panoptic_occlusion_segmentation/logs/20201217_035948.655918',
'pix_loss_scale': 1.0,
'pooling_func': 'align',
'pretrained_model': None,
'rpn_dim': 512,
'seed': 0,
'step_size': [80.0, 106.66666666666666],
'timestamp': '2020-12-17T03:59:48.655918',
'weight_decay': 0.0001}
# -----------------------------------------------------------------------------
/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/imgaug/imgaug.py:184: DeprecationWarning: Function `copy_random_state()` is deprecated. Use `imgaug.random.copy_generator_unless_global_rng` instead.
warn_deprecated(msg, stacklevel=3)
/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/imgaug/imgaug.py:184: DeprecationWarning: Function `copy_random_state()` is deprecated. Use `imgaug.random.copy_generator_unless_global_rng` instead.
warn_deprecated(msg, stacklevel=3)
/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/imgaug/imgaug.py:184: DeprecationWarning: Function `copy_random_state()` is deprecated. Use `imgaug.random.copy_generator_unless_global_rng` instead.
warn_deprecated(msg, stacklevel=3)
Exception in main training loop: Extension implementation must override __call__.
Traceback (most recent call last):
File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/chainer/training/trainer.py", line 319, in run
entry.extension(self)
File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/chainer/training/extension.py", line 64, in __call__
raise NotImplementedError(
Will finalize trainer extensions and updater before reraising the exception.
Traceback (most recent call last):
File "./train.py", line 386, in <module>
main()
File "./train.py", line 382, in main
trainer.run()
File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/chainer/training/trainer.py", line 349, in run
six.reraise(*exc_info)
File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/six.py", line 703, in reraise
raise value
File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/chainer/training/trainer.py", line 319, in run
entry.extension(self)
File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/chainer/training/extension.py", line 64, in __call__
raise NotImplementedError(
NotImplementedError: Extension implementation must override __call__.
Any idea how to circumvent this error?
We developed this with older Chainer, so maybe you have to check its version or modify the Extension to adapt to the latest version.
After running
make install
ininstance_occlsegm
directory, and as in the sequence of the readme file, I followed by these two commands:$ cd examples/instance_occlsegm/panoptic_occlusion_segmentation $ ./train.py --gpu 0 --notrain pix # instnce-only
And I got this error:
# ----------------------------------------------------------------------------- {'anchor_scales': (4, 8, 16, 32), 'batch_size': 1, 'class_names': ['avery_binder', 'balloons', 'band_aid_tape', 'bath_sponge', 'black_fashion_gloves', 'burts_bees_baby_wipes', 'colgate_toothbrush_4pk', 'composition_book', 'crayons', 'duct_tape', 'epsom_salts', 'expo_eraser', 'fiskars_scissors', 'flashlight', 'glue_sticks', 'hand_weight', 'hanes_socks', 'hinged_ruled_index_cards', 'ice_cube_tray', 'irish_spring_soap', 'laugh_out_loud_jokes', 'marbles', 'measuring_spoons', 'mesh_cup', 'mouse_traps', 'pie_plates', 'plastic_wine_glass', 'poland_spring_water', 'reynolds_wrap', 'robots_dvd', 'robots_everywhere', 'scotch_sponges', 'speed_stick', 'table_cloth', 'tennis_ball_container', 'ticonderoga_pencils', 'tissue_box', 'toilet_brush', 'white_facecloth', 'windex'], 'dataset': 'occlusion', 'git_hash': '6ed93840', 'gpu': 0, 'hostname': 'BQ-DX1100-CT', 'lr': 0.00125, 'lr_base': 0.00125, 'mask_loss': 'softmax', 'max_epoch': 120, 'max_size': 1000, 'min_size': 600, 'model': 'resnet50', 'multi_node': False, 'n_gpu': 1, 'n_node': 1, 'noaugmentation': False, 'notrain': 'pix', 'out': '/home/student2/PycharmProjects/masterproject/relook/jsk_apc/demos/instance_occlsegm/examples/instance_occlsegm/panoptic_occlusion_segmentation/logs/20201217_035948.655918', 'pix_loss_scale': 1.0, 'pooling_func': 'align', 'pretrained_model': None, 'rpn_dim': 512, 'seed': 0, 'step_size': [80.0, 106.66666666666666], 'timestamp': '2020-12-17T03:59:48.655918', 'weight_decay': 0.0001} # ----------------------------------------------------------------------------- /home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/imgaug/imgaug.py:184: DeprecationWarning: Function `copy_random_state()` is deprecated. Use `imgaug.random.copy_generator_unless_global_rng` instead. warn_deprecated(msg, stacklevel=3) /home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/imgaug/imgaug.py:184: DeprecationWarning: Function `copy_random_state()` is deprecated. Use `imgaug.random.copy_generator_unless_global_rng` instead. warn_deprecated(msg, stacklevel=3) /home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/imgaug/imgaug.py:184: DeprecationWarning: Function `copy_random_state()` is deprecated. Use `imgaug.random.copy_generator_unless_global_rng` instead. warn_deprecated(msg, stacklevel=3) Exception in main training loop: Extension implementation must override __call__. Traceback (most recent call last): File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/chainer/training/trainer.py", line 319, in run entry.extension(self) File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/chainer/training/extension.py", line 64, in __call__ raise NotImplementedError( Will finalize trainer extensions and updater before reraising the exception. Traceback (most recent call last): File "./train.py", line 386, in <module> main() File "./train.py", line 382, in main trainer.run() File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/chainer/training/trainer.py", line 349, in run six.reraise(*exc_info) File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/six.py", line 703, in reraise raise value File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/chainer/training/trainer.py", line 319, in run entry.extension(self) File "/home/student2/anaconda3/envs/relook/lib/python3.8/site-packages/chainer/training/extension.py", line 64, in __call__ raise NotImplementedError( NotImplementedError: Extension implementation must override __call__.
Any idea how to circumvent this error?
I changed the chainer version to 5.0.0. It works.
Thanks for the response. I am a bit confused, which CuPy pakage do you have installed in this specific case?
Thanks for the response. I am a bit confused, which CuPy pakage do you have installed in this specific case?
I download the cupy-cuda101. It works.
It appears that in the directory below there is not a _viewdataset.py file: _jsk_apc/demos/instance_occlsegm/examples/instance_occlsegm/semanticsegmentation
I ran into this problem when I was trying the commands in the README.md file in this directory: _jsk_apc/demos/instanceocclsegm
This part in particular:
Dataset for semantic (image-level) occlusion segmentation
cd examples/instance_occlsegm/semantic_segmentation ./view_dataset.py
I am still trying this repo for the first time... Any help is highly appreciated, thanks a lot in advance.