KittiSeg icon indicating copy to clipboard operation
KittiSeg copied to clipboard

max() arg is an empty sequence

Open Double-0-Raiser opened this issue 7 years ago • 5 comments

hi, when I trained my own data, I met a the probleme ValueError: max() arg is an empty sequence. In file /incl/seg_utils/seg_utils.py line 139 in pxEval_maximizeFMeasure. Do you have any idea why may this happen?? Thanks Antoine

Double-0-Raiser avatar Aug 11 '17 12:08 Double-0-Raiser

I also met the this issue. Did you solve this problem? Could you share the solution?

chamcham115 avatar Aug 28 '17 03:08 chamcham115

I met it again. Have you solved it? @humengyu @chamcham115 It happened in long time training and the whole notice is: /usr/app/KittiSeg/incl/seg_utils/seg_utils.py:119: RuntimeWarning: invalid value encount ered in divide recall = totalTP / float( totalPosNum ) /usr/app/KittiSeg/incl/seg_utils/seg_utils.py:135: RuntimeWarning: invalid value encount ered in greater_equal ind = np.where(recall>=i) 2017-12-12 07:22:10.706232: W tensorflow/core/kernels/queue_base.cc:294] 0_Queues/fifo queue: Skipping cancelled enqueue attempt with queue not closed Traceback (most recent call last): File "continue.py", line 99, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "continue.py", line 95, in main train.continue_training(tf.app.flags.FLAGS.logdir) File "incl/tensorvision/train.py", line 462, in continue_training run_training(hypes, modules, tv_graph, tv_sess, cur_step) File "incl/tensorvision/train.py", line 289, in run_training hypes, sess, tv_graph['image_pl'], tv_graph['inf_out']) File "RUNS/KittiSeg_2017_12_12_02.49/model_files/eval.py", line 135, in evaluate total_posnum, total_negnum, total_fn, total_fp, thresh=thresh) File "/usr/app/KittiSeg/incl/seg_utils/seg_utils.py", line 138, in pxEval_maximizeFMea sure pmax = max(precision[ind]) ValueError: max() arg is an empty sequence Could you please give some advice if you have time? thank you in advance. @MarvinTeichmann @villanuevab

SummerHuiZhang avatar Dec 12 '17 07:12 SummerHuiZhang

We're on the same page on this one. I didn't notice this thread existed and created my own. nevertheless I'm referencing my thread for merge later. My thread #153

cxfire16 avatar Jan 25 '18 01:01 cxfire16

Did you solve this error ? @cxfire16 @SpicedCornedEgg @chamcham115 @SummerHuiZhang @MarvinTeichmann @villanuevab

devimonica avatar Mar 31 '20 20:03 devimonica

This error means that both recall and precision are 0 for all images. In my case, it had something to do with the color specified for background and road classes. Note that the images are read using RGB mode (scipy.misc.imread). Also, I had anotated my data using labelme and expected the red color to be [0,0,255], but I checked the images and the red pixels were [0,0,128] instead. I hope this helps.

pouyashiri avatar Oct 19 '21 19:10 pouyashiri