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
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[10] = 10 is not in [0, 0) #9067
Comments
same error |
same here
|
Resolved. For me the problem was that in some cases 'xmin' were larger than 'xmax'. To my experience this error appears when there is something wrong with the data. |
Thanks, it solved my problem after fixing my annotations. |
I got the same error with mask rcnn inception reset. can you please tell how did u fix your annotations? |
annotations should be from top left to bottom right. Take a look at video i am sharing below https://drive.google.com/file/d/1pSLMu6lEqpdvYr2XqaDaEUcVyIp-YEOi/view?usp=sharing |
can u tell me the name of software you are using to create the annotation? |
one last question is it making mask labels? and have you try it with mask rcnn? |
No it is not mask rcnn. It is a normal way of annotating objects inside a dataset. I haven't tried mask rcnn. |
If the same set of annotations works for SSD Mobilenet/ FastRCNNResnet50 then why is there issue with MaskRCNN? |
Hello, I have the same issue with mask rcnn. I am using labelme to generate masks and converting json files from label me format to coco format json file. And then using the coco format json file to generate tf records. I get the same error message. Has any one resolved it? |
the same error,the the error happen in maskrcnn train while no problem in other model like ssd,I use the labelimg the picture to xml,to csv,to record, import os, sys
import glob
import pandas as pd
import xml.etree.ElementTree as ET
def xml_to_csv(_path, _out_file):
xml_list = []
for xml_file in glob.glob(_path + '/*.xml'):
tree = ET.parse(xml_file)
root = tree.getroot()
for member in root.findall('object'):
value = (root.find('filename').text,
int(root.find('size')[0].text),
int(root.find('size')[1].text),
member[0].text,
int(member[4][0].text),
int(member[4][1].text),
int(member[4][2].text),
int(member[4][3].text)
)
xml_list.append(value)
column_name = ['filename', 'width', 'height', 'class', 'xmin', 'ymin', 'xmax', 'ymax']
xml_df = pd.DataFrame(xml_list, columns=column_name)
xml_df.to_csv(_out_file, index=None)
print('Successfully converted xml to csv.')
if __name__ == '__main__':
# convert
xml_to_csv(sys.argv[1], sys.argv[2]) csv_tfrecord.py like this
I also view the record by the scrpit below:
that look like no problem,and no problem in othet object detect model. |
have you sloved it, i face the same error in mask_rcnn |
Same problem here. Has anyone found a solution yet. It seems there is a compatibility issue in loading the pre-trained checkpoint.
|
Prerequisites
Please answer the following questions for yourself before submitting an issue.
1. The entire URL of the file you are using
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/using_your_own_dataset.md
2. Describe the bug
I am trying to write the equivalent of this code which converts CSV to TF records but instead, I am trying to convert from JSON to TFrecords. I am trying to generate TFrecords for using it in object detection API.
Here is my full error message
And here is my code, which is an attempt to convert JSON files into TFrecords
Sample JSON file
My Python Code
Can someone give any tips on what is going wrong?
3. Steps to reproduce
I execute the code above to convert JSON to TF records
4. Expected behavior
A TF record that works which I can use when executing the following
Here is my config file
5. Additional context
6. System information
The text was updated successfully, but these errors were encountered: