Track R-CNN代码训练环境配置过程(python3.6.7 tensorflow-gpu1.1.31 GTX1080)

环境配置

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
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值