Objective: (safe) power-off the computer with pressing the power button
Refer to:
https://askubuntu.com/questions/430776/how-can-i-modify-the-power-button-behaviour
https://askubuntu.com/questions/1000393/how-to-configure-the-power-off-button-to-just-power-off-instantly-in-ubuntu-17-1?rq=1
https://ubuntuforums.org/showthread.php?t=2270015
2018년 8월 15일 수요일
2018년 5월 15일 화요일
2018년 5월 1일 화요일
Errors in Caffe
Traceback (most recent call last):
File "Scripts/compute_bn_statistics.py", line 15, in <module>
import caffe
File "/home/morinjwang/DL/caffe-segnet-cudnn5/python/caffe/__init__.py", line 1, in <module>
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
File "/home/morinjwang/DL/caffe-segnet-cudnn5/python/caffe/pycaffe.py", line 13, in <module>
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: dynamic module does not define init function (init_caffe)
Traceback (most recent call last):
File "Scripts/compute_bn_statistics.py", line 15, in <module>
import caffe
File "/home/morinjwang/DL/caffe-segnet-cudnn5/python/caffe/__init__.py", line 1, in <module>
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
File "/home/morinjwang/DL/caffe-segnet-cudnn5/python/caffe/pycaffe.py", line 13, in <module>
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: dynamic module does not define init function (init_caffe)
check if you compile your Caffe library using python 2.7 OR python 3.*
2018년 4월 30일 월요일
2018년 3월 6일 화요일
2018년 3월 4일 일요일
Trial and error to follow SegNet-Tutorial(3)
(link: http://mi.eng.cam.ac.uk/projects/segnet/tutorial.html)
5. training SegNet using Cityscapes dataset
number of labels in Cityscapes dataset: 34 (id 0 to 33)
re-grouping labels into 11+1 classes ( sky, building, pole, road, pavement, tree, signsymbol, fence, car, pedestrian, bicyclist, unlabelled )
(to-be-updated)
(link: http://mi.eng.cam.ac.uk/projects/segnet/tutorial.html)
5. training SegNet using Cityscapes dataset
number of labels in Cityscapes dataset: 34 (id 0 to 33)
re-grouping labels into 11+1 classes ( sky, building, pole, road, pavement, tree, signsymbol, fence, car, pedestrian, bicyclist, unlabelled )
(to-be-updated)
2018년 1월 17일 수요일
Trial and error to follow SegNet-Tutorial(2)
(link: http://mi.eng.cam.ac.uk/projects/segnet/tutorial.html)
4. test my own data
1) change the path of dense_image_data_param-source in *.prototxt file
========================================================================
segnet_inference_kitti.prototxt
name: "VGG_ILSVRC_16_layer"
layer {
name: "data"
type: "DenseImageData"
top: "data"
top: "label"
dense_image_data_param {
source: "/home/morinjwang/data/JWang2017IROS/test.txt" # Change this to the absolute path to your data file
batch_size: 1
}
}
========================================================================
Note that if you want to automatically resize the testing images, try to add two lines below
========================================================================
segnet_inference_kitti.prototxt
name: "VGG_ILSVRC_16_layer"
layer {
name: "data"
type: "DenseImageData"
top: "data"
top: "label"
dense_image_data_param {
source: "/home/morinjwang/data/JWang2017IROS/test.txt" # Change this to the absolute path to your data file
batch_size: 1
new_height: 360
new_width: 480
}
}
========================================================================
2) make the test.txt file (/path/of/the/original/image /path/of/the/corresponding/groundtruth/image)
========================================================================
text.txt
...
/home/morinjwang/data/JWang2017IROS/image_02/0000/000110.png /home/morinjwang/data/JWang2017IROS/img_gth/segments/0000/000110.png
...
========================================================================
3) run test_segmentation_camvid.py
(link: http://mi.eng.cam.ac.uk/projects/segnet/tutorial.html)
4. test my own data
1) change the path of dense_image_data_param-source in *.prototxt file
========================================================================
segnet_inference_kitti.prototxt
name: "VGG_ILSVRC_16_layer"
layer {
name: "data"
type: "DenseImageData"
top: "data"
top: "label"
dense_image_data_param {
source: "/home/morinjwang/data/JWang2017IROS/test.txt" # Change this to the absolute path to your data file
batch_size: 1
}
}
========================================================================
Note that if you want to automatically resize the testing images, try to add two lines below
========================================================================
segnet_inference_kitti.prototxt
name: "VGG_ILSVRC_16_layer"
layer {
name: "data"
type: "DenseImageData"
top: "data"
top: "label"
dense_image_data_param {
source: "/home/morinjwang/data/JWang2017IROS/test.txt" # Change this to the absolute path to your data file
batch_size: 1
new_height: 360
new_width: 480
}
}
========================================================================
2) make the test.txt file (/path/of/the/original/image /path/of/the/corresponding/groundtruth/image)
========================================================================
text.txt
...
/home/morinjwang/data/JWang2017IROS/image_02/0000/000110.png /home/morinjwang/data/JWang2017IROS/img_gth/segments/0000/000110.png
...
========================================================================
3) run test_segmentation_camvid.py
2018년 1월 8일 월요일
Trial and error to follow SegNet-Tutorial(1)
(link: http://mi.eng.cam.ac.uk/projects/segnet/tutorial.html)
1. download caffe-segnet or caffe-segnet-cudnn accelerated version
- choose one considering your ubuntu configuration. In my case, I tried both, however, I used the 'caffe-segnet-cudnn'
(from https://github.com/ethereon/caffe-tensorflow/issues/118)
Note. we SHOULD download above caffe without using pre-installed caffe. because some parameters are deprecated and no longer valid in our current Caffe version (updated on 1.8.2018).
you can see the definitions in ${CAFFE_ROOT}/src/caffe/proto/caffe.proto
Ex)
message LayerParameter{
...
optional BNParameter bn_param = 45;
...
}
message BNParameter{
...
optional FillerParameter scale_filler = 1; // The filler for the scale
optional FillerParameter shift_filler = 2; // The filler for the shift
}
>> those parameters are no longer valid in current version of Caffe.
2. download trained weights
(link: https://github.com/alexgkendall/SegNet-Tutorial/blob/master/Example_Models/segnet_model_zoo.md)
- For testing segmentation performance of urban scenes, download two files:
CAMVID-SegnetBasic:
http://mi.eng.cam.ac.uk/~agk34/resources/SegNet/segnet_basic_camvid.caffemodel ( segnet_basic_camvid.prototxt)
Cityscapes:
http://mi.eng.cam.ac.uk/~agk34/resources/SegNet/segnet_iter_30000_timo.caffemodel ( segnet_model_driving_webdemo.prototxt)
3. testing the SegNet
using downloaded weights, we can test the network.
1) run test_segmentation_camvid.py
> python SegNet-Tutorial/Scripts/test_segmentation_camvid.py --model SegNet-Tutorial/Models/segnet_inference.prototxt --weights SegNet-Tutorial/Models/Inference/segnet_iter_30000_timo.caffemodel --iter 233
(link: http://mi.eng.cam.ac.uk/projects/segnet/tutorial.html)
1. download caffe-segnet or caffe-segnet-cudnn accelerated version
- choose one considering your ubuntu configuration. In my case, I tried both, however, I used the 'caffe-segnet-cudnn'
(from https://github.com/ethereon/caffe-tensorflow/issues/118)
Note. we SHOULD download above caffe without using pre-installed caffe. because some parameters are deprecated and no longer valid in our current Caffe version (updated on 1.8.2018).
you can see the definitions in ${CAFFE_ROOT}/src/caffe/proto/caffe.proto
Ex)
message LayerParameter{
...
optional BNParameter bn_param = 45;
...
}
message BNParameter{
...
optional FillerParameter scale_filler = 1; // The filler for the scale
optional FillerParameter shift_filler = 2; // The filler for the shift
}
>> those parameters are no longer valid in current version of Caffe.
2. download trained weights
(link: https://github.com/alexgkendall/SegNet-Tutorial/blob/master/Example_Models/segnet_model_zoo.md)
- For testing segmentation performance of urban scenes, download two files:
CAMVID-SegnetBasic:
http://mi.eng.cam.ac.uk/~agk34/resources/SegNet/segnet_basic_camvid.caffemodel ( segnet_basic_camvid.prototxt)
Cityscapes:
http://mi.eng.cam.ac.uk/~agk34/resources/SegNet/segnet_iter_30000_timo.caffemodel ( segnet_model_driving_webdemo.prototxt)
3. testing the SegNet
using downloaded weights, we can test the network.
1) run test_segmentation_camvid.py
> python SegNet-Tutorial/Scripts/test_segmentation_camvid.py --model SegNet-Tutorial/Models/segnet_inference.prototxt --weights SegNet-Tutorial/Models/Inference/segnet_iter_30000_timo.caffemodel --iter 233
Note. for pretrained weights using cityscapes, author used 11-class model.
In 'test_segmentation_camvid.py' ignore 4th class 'road_marking'
you need to modify the example script a little bit
========================================================================
Activate conda environment
Activate conda environment
https://conda.io/docs/user-guide/tasks/manage-python.html
========================================================================
Caffe-segnet-cudnn build error
when uncommenting 'use_cudnn = 1', there is an error as follows:
...
bc: symbol lookup error: /opt/anaconda3/lib/libreadline.so.6: undefined symbol: PC
try to install readline properly in conda (with ncurses)
https://github.com/conda-forge/rpy2-feedstock/issues/1
========================================================================
Caffe-segnet-cudnn build error
when uncommenting 'use_cudnn = 1', there is an error as follows:
...
bc: symbol lookup error: /opt/anaconda3/lib/libreadline.so.6: undefined symbol: PC
...
try to install readline properly in conda (with ncurses)
https://github.com/conda-forge/rpy2-feedstock/issues/1
2018년 1월 7일 일요일
CAFFE + ANACONDA + PYTHON3.* + CUDA8 + OpenCV3 install reference
https://guozhilingblog.wordpress.com/2016/10/10/caffepython3-5anaconda3opencv3-1cuda7-5ubuntu14-04/
https://yangcha.github.io/Caffe-Conda/
http://blog.csdn.net/lien0906/article/details/51784191
http://yingshu.ink/2017/01/12/Python3-5-Anaconda3-Caffe%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E6%A1%86%E6%9E%B6%E6%90%AD%E5%BB%BA/
https://hub.docker.com/r/yangcha/caffe-gpu-conda/~/dockerfile/
https://guozhilingblog.wordpress.com/2016/10/10/caffepython3-5anaconda3opencv3-1cuda7-5ubuntu14-04/
https://yangcha.github.io/Caffe-Conda/
http://blog.csdn.net/lien0906/article/details/51784191
http://yingshu.ink/2017/01/12/Python3-5-Anaconda3-Caffe%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0%E6%A1%86%E6%9E%B6%E6%90%AD%E5%BB%BA/
https://hub.docker.com/r/yangcha/caffe-gpu-conda/~/dockerfile/
2018년 1월 6일 토요일
Visdom running error (Python3.6.1+anaconda+multiuser env)
2. Manually download the missing files. For my case, 'fonts/classnames' and 'fonts/layout_bin_packer' are missing. Try to download the files in the following links
'fonts/classnames': http://jedwatson.github.io/classnames
'fonts/layout_bin_packer': https://github.com/stefanpenner/layout-bin-packer
(Updated 21:29 18.1.6)
because of classnames and layout_bin_packer directories which I made by hand (stupid)
Note that after "pip uninstall visdom", files are not clearly removed in case of the downloaded scripts when you first run visdom.
Error like "Could not open static file"
1. Try to change the lines in /opt/anaconda3/lib/python3.6/site-packages/visdom/static/index.html
following the link
http://blog.csdn.net/xiaocainiaodeboke/article/details/78941243
(https://github.com/facebookresearch/visdom/issues/185, help)
(https://github.com/facebookresearch/visdom/issues/185, help)
because of classnames and layout_bin_packer directories which I made by hand (stupid)
Note that after "pip uninstall visdom", files are not clearly removed in case of the downloaded scripts when you first run visdom.
2018년 1월 5일 금요일
GPU usage check in Ubuntu
http://dongjinlee.tistory.com/entry/Check-the-gpu-usage-in-Ubuntu
========================================================================
CUDA version check
nvcc --
========================================================================
CUDNN version check
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
http://dongjinlee.tistory.com/entry/Check-the-gpu-usage-in-Ubuntu
========================================================================
CUDA version check
nvcc --
========================================================================
CUDNN version check
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
2018년 1월 4일 목요일
피드 구독하기:
덧글 (Atom)