zero-shot object detection
推薦搭配套餐:
- Python 2.7
- Keras 2.1.4
- OpenCV 2.4.13
- Tensorflow 1.3.0
或者:
- Python 3.5-3.6
- Keras 2.0.8
- OpenCV 3.4.0
- Tensorflow 1.3.0
安裝:
1 本人套餐:
NVIDIA-SMI 384.130
CUDA Version 8.0.61
CUDNN_VERSION 6.0.21
pip install keras==2.1.4 pip install tensorflow-gpu==1.3.0 pip install opencv-python
2 下載h5格式的預訓練檔案,放入model資料夾:
https://www.dropbox.com/s/v6ueoa1g19bddao/model_frcnn.hdf5?dl=0
網頁需要翻qiang下載,或者百度雲下載:
連結: https://pan.baidu.com/s/1ZORTuXEoTNQHYkslLQW9vA 提取碼: 5tui
3 執行:
執行detect.py 批量檢測Dataset/Sampleinput下的圖片,輸出圖片在Dataset/Sampleoutput
問題 1:
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
解決:
這是因為我裝了tensorflow-gpu 1.5版本,而我用的是cuda 8.0和cudnn6.0,1.5版本要求cuda 9.0,我的做法就是回滾:
pip install tensorflow-gpu==1.3.0
問題 2:
File "/home/thu/anaconda3/lib/python3.5/site-packages/tensorflow/python/framework/common_shapes.py", line 659, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Shape must be rank 1 but is rank 0 for 'bn_conv1/Reshape_4' (op: 'Reshape') with input shapes: [1,1,1,64], [].
解決:
pip install keras==2.1.4
問題 3:
OSError: Unable to open file (Unable to open file: name = 'model/model_frcnn.hdf5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)
解決:
下載h5格式的預訓練檔案,放入model資料夾:
https://www.dropbox.com/s/v6ueoa1g19bddao/model_frcnn.hdf5?dl=0
網頁需要翻qiang下載,或者百度雲下載:
連結: https://pan.baidu.com/s/1ZORTuXEoTNQHYkslLQW9vA 提取碼: 5tui
Ref: https://github.com/salman-h-khan/ZSD_Release