MarvinTeichmann / KittiSeg

A Kitti Road Segmentation model implemented in tensorflow.
MIT License
909 stars 403 forks source link

All the problems solved on win7(pycharmpython3.6、cpu) #180

Open zhaojingji opened 6 years ago

zhaojingji commented 6 years ago

1、For windows user, save the following code as install_windows.bat and put it in your KittiSeg folder, then run it as admin. Also please make sure you initialized all your submodules with git submodule update --init --recursive

del %~dp0\incl\evaluation del %~dp0\incl\seg_utils del %~dp0\incl\tensorflow_fcn del %~dp0\incl\tensorvision mklink /D %~dp0\incl\evaluation %~dp0\submodules\evaluation mklink /D %~dp0\incl\seg_utils %~dp0\submodules\evaluation\kitti_devkit mklink /D %~dp0\incl\tensorflow_fcn %~dp0\submodules\tensorflow-fcn mklink /D %~dp0\incl\tensorvision %~dp0\submodules\TensorVision\tensorvision echo ok pause

It will create the symbolic links for you

2、incl/utils/data_utils.py", line 71,in get_cell_grid for iy in xrange(cell_height): xrange改为range

3、 "/incl/utils/data_utils.py",line 129, in annotation_jitter if random.random > 0.8: TypeError: unorderable types:builtin_function_or_method() > float() random.random 改为random.random()

4、inputs/kitti_input.py", line 160 generator的next属性
gen.next()改为gen.next()

5、incl/tensorvision/train.py", line163, in _print_eval_dict

AttributeError: module 'string' has noattribute 'join' print_str = string.join([nam + ": %.2f" for nam in eval_names],‘,’) 改为print_str=", ".join([nam + ": %.2f" for nam in eval_names])

6、tensorflow.python.framework.errors_impl.InvalidArgumentError:0-th value returned by pyfunc_0 is uint8, but expects float 修改fastBox.py的evaluaction函数473行 pred_log_img = tf.py_func(log_image, [images,test_pred_confidences, test_pred_boxes,global_step, 'pred'], [tf.float32]) 改为 pred_log_img = tf.py_func(log_image, [images,test_pred_confidences, test_pred_boxes,global_step, 'pred'], [tf.uint8]) 7、 File "/home/FCN/kittiseg/hypes/../optimizer/generic_optimizer.py", line 92, in training train_op = opt.apply_gradients(grads_and_vars, global_step=global_step) File "tensorflow/tf_0.12/lib/python3.4/site-packages/tensorflow/python/training/optimizer.py", line 370, in apply_gradients raise ValueError("No variables provided.") ValueError: No variables provided.

grads, tvars = zip(*grads_and_vars) clip_norm = hypes["clip_norm"] clipped_grads, norm = tf.clip_by_global_norm(grads, clip_norm) grads_and_vars = zip(clipped_grads, tvars) 改为 clip_norm = hypes["clip_norm"] grads_and_vars = [(tf.clip_by_value(grad, -clip_norm, clip_norm), var) for grad, var in grads_and_vars]

(win7、 pycharmpython3.6、cpu遇到的问题,这7条基本就能解决了。拿走不谢~~~~)

zhaojingji commented 6 years ago

不知道为什么4th条下划线没显示出来,next左右各有两条下划线

louxy126 commented 6 years ago

老铁,我按照你的方法试验了一下,但是在第train.py的时候,报错: 2018-10-08 13:43:46,036 INFO No environment variable 'TV_PLUGIN_DIR' found. Set to 'C:\Users\louxy126/tv-plugins'. 2018-10-08 13:43:46,036 INFO No environment variable 'TV_STEP_SHOW' found. Set to '50'. 2018-10-08 13:43:46,036 INFO No environment variable 'TV_STEP_EVAL' found. Set to '250'. 2018-10-08 13:43:46,036 INFO No environment variable 'TV_STEP_WRITE' found. Set to '1000'. 2018-10-08 13:43:46,036 INFO No environment variable 'TV_MAX_KEEP' found. Set to '10'. 2018-10-08 13:43:46,036 INFO No environment variable 'TV_STEP_STR' found. Set to 'Step {step}/{total_steps}: loss = {loss_value:.2f}; lr = {lr_value:.2e}; {sec_per_batch:.3f} sec (per Batch); {examples_per_sec:.1f} imgs/sec'. 2018-10-08 13:43:46,039 ERROR Could not import the submodules. 2018-10-08 13:43:46,039 ERROR Please execute:'git submodule update --init --recursive'

请问你有没有碰到过这种情况?谢谢啦

GloriaHM commented 5 years ago

generator的next属性 gen.next()改为gen.next()?? it dose not change anything

tripyang commented 5 years ago

哥,你牛!