-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid argument: ValueError: attempt to get argmax of an empty sequence #101
Comments
Make sure you placed all the needed files in the correct places, then start again the training |
This problem occurred only 20,000 times.
speed: 0.689s / iter File "/home/wangyiqing/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 158, in call File "/home/wangyiqing/last-Faster-RCNN/lib/layer_utils/anchor_target_layer.py", line 52, in anchor_target_layer ValueError: attempt to get argmax of an empty sequence |
It is likely caused by some invalid image; trying to solve it means changing a lot of code, but I have not the time to do it. Since the choice of images is random and no one else found the same issue, restarting it will most likely skip that |
thank you what is an invalid picture ?
you said the choice of images is random.In config.py tf.app.flags.DEFINE_integer('im_per_batch' 1,"Images to use per minibatch") .so Is this one image random in dataset?
Thank you again. I learned a lot.
…------------------ 原始邮件 ------------------
发件人: "morpheusthewhite"<[email protected]>;
发送时间: 2019年9月12日(星期四) 下午4:03
收件人: "dBeker/Faster-RCNN-TensorFlow-Python3"<[email protected]>;
抄送: "没时间当网红"<[email protected]>; "Author"<[email protected]>;
主题: Re: [dBeker/Faster-RCNN-TensorFlow-Python3] Invalid argument:ValueError: attempt to get argmax of an empty sequence (#101)
It is likely caused by some invalid image; trying to solve it means changing a lot of code, but I have not the time to do it.
Since the choice of images is random and no one else found the same issue, restarting it will most likely skip that
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
thank you what is an invalid picture ?
you said the choice of images is random.In config.py tf.app.flags.DEFINE_integer('im_per_batch' 1,"Images to use per minibatch") .so Is this one image random in dataset?
I want to do this. The training pictures are entered into the network in the order of the data set. What should I do?
Thank you again. I learned a lot.
…------------------ 原始邮件 ------------------
发件人: "morpheusthewhite"<[email protected]>;
发送时间: 2019年9月12日(星期四) 下午4:03
收件人: "dBeker/Faster-RCNN-TensorFlow-Python3"<[email protected]>;
抄送: "没时间当网红"<[email protected]>; "Author"<[email protected]>;
主题: Re: [dBeker/Faster-RCNN-TensorFlow-Python3] Invalid argument:ValueError: attempt to get argmax of an empty sequence (#101)
It is likely caused by some invalid image; trying to solve it means changing a lot of code, but I have not the time to do it.
Since the choice of images is random and no one else found the same issue, restarting it will most likely skip that
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
No, they are shuffled in a random manner.
That is the number of image in each minibatch, it does not represent an image itself |
Can I change it? I want to scramble the pictures in the dataset.Then, training in a sequential manner.
…------------------ 原始邮件 ------------------
发件人: "morpheusthewhite"<[email protected]>;
发送时间: 2019年9月28日(星期六) 下午5:52
收件人: "dBeker/Faster-RCNN-TensorFlow-Python3"<[email protected]>;
抄送: "没时间当网红"<[email protected]>; "Author"<[email protected]>;
主题: Re: [dBeker/Faster-RCNN-TensorFlow-Python3] Invalid argument:ValueError: attempt to get argmax of an empty sequence (#101)
The training pictures are entered into the network in the order of the data set
No, they are shuffled in a random manner.
tf.app.flags.DEFINE_integer('im_per_batch' 1,"Images to use per minibatch")
That is the number of image in each minibatch, it does not represent an image itself
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
You just need to change the |
Trouble again
I want to konw what is what is an invalid picture ?
Thank you
…------------------ 原始邮件 ------------------
发件人: "morpheusthewhite"<[email protected]>;
发送时间: 2019年9月29日(星期天) 凌晨3:28
收件人: "dBeker/Faster-RCNN-TensorFlow-Python3"<[email protected]>;
抄送: "没时间当网红"<[email protected]>; "Author"<[email protected]>;
主题: Re: [dBeker/Faster-RCNN-TensorFlow-Python3] Invalid argument:ValueError: attempt to get argmax of an empty sequence (#101)
You just need to change the_shuffle_roidb_inds() in lib/layer_utils/roi_data_layer.py
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I was referring in general to images which are not correctly processed in the algorithm, in your case images which have an empty sequence as |
Can I understand this? Invalid image means that there is no overlap between any anchors and the ground thruth.
In your code,i see a function which is def append_flipped_images(self).This function augment the data by rotating the picture 180 degrees. now I want to augment the data by ratating the picture 90 degrees.can i achieve it like the function def append_flipped_images(self)?
but By rotating 90 degrees,The width and height of the picture have changed.
…------------------ 原始邮件 ------------------
发件人: "morpheusthewhite"<[email protected]>;
发送时间: 2019年10月7日(星期一) 晚上10:28
收件人: "dBeker/Faster-RCNN-TensorFlow-Python3"<[email protected]>;
抄送: "没时间当网红"<[email protected]>; "Author"<[email protected]>;
主题: Re: [dBeker/Faster-RCNN-TensorFlow-Python3] Invalid argument:ValueError: attempt to get argmax of an empty sequence (#101)
I was referring in general to images which are not correctly processed in the algorithm, in your case images which have an empty sequence as overlaps
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yes, I'm almost sure it is so.
You need to adjust bbox (similar to what it's done when they're flipped by 180 degrees) etc. like in append_flipped_images and then you need to rotate the image when it is loaded (in |
W tensorflow/core/framework/op_kernel.cc:1306] Invalid argument: ValueError: attempt to get argmax of an empty sequence
Traceback (most recent call last):
File "/home/wangyiqing/anaconda3/lib/python3.5/site-packages/tensorflow/python/ops/script_ops.py", line 158, in call
ret = func(*args)
File "/home/wangyiqing/last-Faster-RCNN/lib/layer_utils/anchor_target_layer.py", line 52, in anchor_target_layer
argmax_overlaps = overlaps.argmax(axis=1)
ValueError: attempt to get argmax of an empty sequence
image invalid, skipping
Terminated
The text was updated successfully, but these errors were encountered: