环境配置
conda create -n trackrcnn
conda install python==3.6.7
conda install tensorflow-gpu==1.13.1
pip install numpy==1.16.0
pip install pycocotools
pip install scipy sklearn pypng opencv-python munkres
conda install scipy==1.2.0
pip install scikit-image
pip install numpy==1.16.0
(solve: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)]))
这个不对:conda install ipython (solve: ModuleNotFoundError: No module named 'java')
pip install keras==2.2.4
解决报错问题
FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
numpy版本过高,降低版本
pip install numpy==1.16.0
在main.py 开头加上
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
'xxx' object has no attribute 'decode'
AttributeError: 'str' object has no attribute 'decode'
AttributeError: 'tensorflow.python.framework.ops.EagerTensor' object has no attribute 'encode'
报错代码在KITTI_segtrack.py
def successor_frame_filename_np(filename, offset):
filename = filename.decode('utf-8')
在main.py 开头加上
import importlib,sys
importlib.reload(sys)
修改KITTI_segtrack.py
def successor_frame_filename_np(filename, offset):
def successor_frame_filename_np(filename, offset):
print("转换前",filename)
print("转换前",type(filename)) # <class 'tensorflow.python.framework.ops.EagerTensor'>
filename = str(filename)
print("转换后", filename)
print("转换后",type(filename)) # 转换后 <class 'str'> 变量是字符串类型的意思
filename = filename.encode('utf-8').decode('utf-8') # encode()对str数据类型进行操作,decode()bytes数据类型进行操作
# filename = filename.decode('utf-8')
print("解码后", filename)
print("解码后",type(filename))
File "/media/zhuzhu/23227915-deb6-45d3-8d7d-7070283de100/zhuzhu/MOTS/TrackR-CNN/TrackR-CNN-master/datasets/KITTI/segtrack/KITTI_segtrack.py", line 139, in successor_frame_filename_np
t = int(sp[-1].replace(".png", "").replace(".jpg", ""))
ValueError: invalid literal for int() with base 10: "000562', shape=(), dtype=string)"
[[{
{node EagerPyFunc}}]]
[[node IteratorGetNext (defined at /media/zhuzhu/23227915-deb6-45d3-8d7d-7070283de100/zhuzhu/MOTS/TrackR-CNN/TrackR-CNN-master/datasets/Dataset.py:303) ]]
[[node trainnet/tower_gpu_0/frcnn_1/NonMaxSuppression (defined at /media/zhuzhu/23227915-deb6-45d3-8d7d-7070283de100/zhuzhu/MOTS/TrackR-CNN/TrackR-CNN-master/network/FasterRCNN_utils.py:126) ]]
File "/media/zhuzhu/23227915-deb6-45d3-8d7d-7070283de100/zhuzhu/MOTS/TrackR-CNN/TrackR-CNN-master/datasets/KITTI/segtrack/KITTI_segtrack.py", line 144, in successor_frame_filename_np
t = int(sp[-1].replace(".png", "").replace(".jpg", ""))
ValueError: invalid literal for int() with base 10: "000539', shape=(), dtype=string)"
[[{
{node EagerPyFunc_1}}]]
[[node IteratorGetNext (defined at /media/zhuzhu/23227915-deb6-45d3-8d7d-7070283de100/zhuzhu/MOTS/TrackR-CNN/Track