Skip to content
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

Missing classes name while generating label_map.pbtxt #1279

Closed
sainisanjay opened this issue Mar 17, 2020 · 5 comments
Closed

Missing classes name while generating label_map.pbtxt #1279

sainisanjay opened this issue Mar 17, 2020 · 5 comments

Comments

@sainisanjay
Copy link

I have created tfrecord usingcvat/utils/tfrecords/convert.py but when i check label_map.pbtxt it missed one class name. I have 7 classes [Car Truck MotorBikes Bicycle Bus Van Pedestrian] in my xml file but it generates only 6 classes in label_map.pbtxt . In my xml has only 2 MotorBikes samples which is not generated in label_map.pbtxt . Only lower number of sample class name is missing.

item {
	id: 1
	name: 'car'
}
item {
	id: 2
	name: 'van'
}
item {
	id: 3
	name: 'truck'
}
item {
	id: 4
	name: 'pedestrian'
}

item {
	id: 5
	name: 'bus'
}
item {
	id: 6
	name: 'bicycle'
}
@zhiltsov-max
Copy link
Contributor

@sainisanjay, looking at the script, I can say that the labels are collected from input annotations, so, probably, there are no motorbike bboxes. I'd recommend to use task export or Datumaro for generating annotations in different formats, as these scripts are deprecated.

@sainisanjay
Copy link
Author

Hi @zhiltsov-max, I have verified multiple times that MoterBikes bounding box is available in the xml file:

<box label="Objects" occluded="0" xbr="-143.55864" xtl="0" ybr="825.2294" ytl="363.41858">
<attribute name="Occlusion %">0%</attribute>
<attribute name="Truncation %">0%</attribute>
<attribute name="Class">MotorBikes</attribute>
</box>

can you elaborate what do you mean by, use task export or Datumaro for generating annotations in different formats

@zhiltsov-max
Copy link
Contributor

By "task export" I meant the export buttons for the task in the CVAT UI.
By "Datumaro" I meant the Datumaro project here, which have dataset conversion facilities.

@zhiltsov-max
Copy link
Contributor

Probably you should take a look at --min-train parameter and set it to 0.

parser.add_argument(
        '--min-train', metavar='NUM', required=False, default=10, type=int,
        help='The minimum number of images above which the label is considered (default: 10)'
    )

@sainisanjay
Copy link
Author

@zhiltsov-max Thanks --min-train parameter was the issue, as i was having less than 10 samples for MoterBikes class that's why it did't generate label for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants