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

labels.txt not able to read the label 'car' #1448

Open
amodpatil1 opened this issue Jun 11, 2024 · 0 comments
Open

labels.txt not able to read the label 'car' #1448

amodpatil1 opened this issue Jun 11, 2024 · 0 comments
Labels
bug issue

Comments

@amodpatil1
Copy link

Provide environment information

python labelme2voc.py /home/amodpatil/semantic_dataset/segmentation /home/amodpatil/semantic_dataset/am --labels /home/amodpatil/pytorch-segmentation/datasets/labels.txt
Creating dataset: /home/amodpatil/semantic_dataset/am
Generating dataset from: /home/amodpatil/semantic_dataset/segmentation/left2306.json
Label name to value dictionary: {'vegetation': 1, 'traffic-light': 2, 'road': 3, 'sidewalk': 4, 'parking': 5, 'building': 6}
Shapes: [{'label': 'sidewalk', 'points': [[586.0, 413.5], [552.0, 412.5], [551.0, 411.5], [547.0, 411.5], [546.0, 410.5], [533.0, 410.5], [532.0, 409.5], [512.0, 408.5], [509.0, 406.5], [507.0, 407.5], [506.0, 406.5], [492.0, 406.5], [491.0, 405.5], [482.0, 405.5], [481.0, 404.5], [477.0, 403.5], [475.5, 402.0], [475.5, 399.0], [481.5, 394.0], [481.5, 392.0], [480.5, 391.0], [481.5, 386.0], [480.5, 384.0], [476.5, 381.0], [473.5, 375.0], [473.5, 372.0], [471.5, 368.0], [470.5, 361.0], [469.5, 360.0], [469.5, 354.0], [467.5, 350.0], [467.5, 342.0], [466.5, 341.0], [466.5, 338.0], [463.0, 333.5], [461.0, 333.5], [458.5, 332.0], [456.5, 330.0], [456.5, 328.0], [460.0, 326.5], [475.0, 326.5], [476.0, 327.5], [487.0, 327.5], [488.0, 328.5], [511.0, 328.5], [512.0, 329.5], [525.0, 329.5], [526.0, 328.5], [535.0, 328.5], [536.0, 327.5], [542.0, 327.5], [543.0, 328.5], [545.0, 328.5], [546.0, 327.5], [553.0, 327.5], [554.0, 328.5], [556.0, 327.5], [559.0, 327.5], [560.0, 328.5], [575.0, 329.5], [575.0, 331.5], [577.0, 331.5], [578.0, 332.5], [583.0, 332.5], [639.0, 332.70833333333337], [639.0, 338.95833333333337], [639.0, 347.2916666666667], [639.0, 363.95833333333337], [639.0, 372.2916666666667], [639.0, 368.12500000000006], [639.0, 386.0416666666667], [639.0, 383.5416666666667], [639.0, 393.95833333333337], [639.0, 405.62500000000006], [637.2916666666666, 419.37500000000006], [617.7083333333334, 419.7916666666667], [589.5, 412.0]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'sidewalk', 'points': [[412.0, 393.5], [391.0, 393.5], [390.0, 392.5], [379.0, 392.5], [378.0, 391.5], [371.0, 391.5], [370.0, 390.5], [362.0, 390.5], [361.0, 389.5], [347.0, 389.5], [346.0, 388.5], [337.0, 388.5], [336.0, 387.5], [325.0, 387.5], [324.0, 386.5], [281.0, 385.5], [280.0, 384.5], [272.0, 383.5], [270.0, 381.5], [267.0, 381.5], [265.5, 380.0], [269.0, 378.5], [269.5, 377.0], [275.0, 372.5], [277.0, 372.5], [291.0, 365.5], [293.0, 365.5], [295.0, 363.5], [302.0, 362.5], [305.0, 359.5], [307.0, 358.5], [310.0, 358.5], [315.0, 355.5], [317.0, 355.5], [325.0, 350.5], [328.0, 350.5], [329.0, 349.5], [332.0, 349.5], [335.0, 347.5], [337.0, 347.5], [340.0, 344.5], [349.0, 340.5], [354.0, 336.5], [362.0, 336.5], [363.0, 335.5], [368.0, 334.5], [371.0, 332.5], [373.0, 332.5], [376.0, 330.5], [378.0, 330.5], [381.0, 328.5], [383.0, 328.5], [384.0, 327.5], [389.0, 327.5], [396.0, 333.5], [401.0, 335.5], [402.5, 337.0], [403.5, 343.0], [404.5, 344.0], [402.5, 347.0], [402.5, 365.0], [403.5, 366.0], [404.5, 372.0], [406.5, 375.0], [406.5, 377.0], [409.5, 384.0], [409.5, 390.0], [412.5, 392.0]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'road', 'points': [[521.0, 479.0], [506.0, 475.5], [502.0, 467.5], [499.5, 469.0], [502.5, 476.0], [496.0, 476.5], [493.5, 461.0], [463.0, 433.5], [452.0, 438.5], [449.0, 432.5], [442.0, 434.5], [439.0, 430.5], [410.5, 429.0], [440.0, 426.5], [399.0, 423.5], [324.0, 427.5], [283.0, 433.5], [285.0, 437.5], [281.0, 437.5], [279.0, 432.5], [274.5, 434.0], [277.5, 436.0], [275.0, 437.5], [241.0, 432.5], [179.0, 434.5], [136.0, 444.5], [69.0, 448.5], [1.0, 465.5], [0.5, 365.0], [9.0, 360.5], [11.0, 366.5], [21.0, 369.5], [104.0, 368.5], [105.0, 371.5], [82.0, 369.5], [80.5, 373.0], [112.0, 377.5], [140.0, 377.5], [144.0, 372.5], [159.0, 371.5], [160.5, 376.0], [155.5, 380.0], [158.0, 381.5], [217.0, 386.5], [229.0, 381.5], [248.0, 380.5], [249.0, 377.5], [253.0, 380.5], [254.0, 376.5], [256.0, 382.5], [272.0, 381.5], [282.0, 386.5], [310.0, 387.5], [312.0, 390.5], [389.0, 394.5], [421.0, 398.5], [422.0, 401.5], [479.0, 406.5], [481.0, 410.5], [553.0, 413.5], [549.5, 417.0], [559.0, 417.5], [561.0, 421.5], [611.0, 420.5], [620.5, 422.0], [615.0, 425.5], [635.5, 427.0], [620.0, 428.5], [619.0, 431.5], [616.0, 428.5], [597.0, 431.5], [594.0, 428.5], [590.0, 431.5], [584.0, 428.5], [577.0, 431.5], [572.0, 427.5], [548.0, 431.5], [541.0, 428.5], [540.0, 431.5], [521.0, 431.5], [519.0, 434.5], [512.0, 430.5], [509.5, 440.0], [502.0, 438.5], [499.0, 446.5], [492.0, 439.5], [490.5, 450.0], [502.0, 461.5], [514.0, 466.5], [520.5, 462.0]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'car', 'points': [[276.0, 356.5], [259.0, 356.5], [251.0, 348.5], [238.0, 348.5], [237.0, 347.5], [231.0, 348.5], [229.0, 346.5], [226.0, 346.5], [224.0, 348.5], [222.0, 346.5], [217.0, 345.5], [216.0, 346.5], [207.0, 345.5], [206.0, 346.5], [197.0, 345.5], [193.0, 346.5], [180.0, 344.5], [167.0, 344.5], [165.0, 342.5], [137.0, 341.5], [133.5, 338.0], [130.5, 330.0], [130.5, 308.0], [133.5, 294.0], [136.5, 288.0], [140.5, 284.0], [141.5, 278.0], [145.0, 274.5], [152.0, 271.5], [170.0, 269.5], [171.0, 267.5], [178.0, 267.5], [181.0, 265.5], [186.0, 265.5], [193.0, 262.5], [207.0, 247.5], [213.0, 244.5], [220.0, 237.5], [231.0, 235.5], [246.0, 235.5], [247.0, 234.5], [253.0, 235.5], [264.0, 233.5], [280.0, 235.5], [295.0, 234.5], [318.0, 237.5], [334.0, 242.5], [351.5, 261.0], [353.5, 266.0], [356.5, 288.0], [359.5, 295.0], [360.5, 302.0], [360.5, 317.0], [358.5, 324.0], [354.0, 327.5], [346.0, 328.5], [339.0, 327.5], [334.0, 323.5], [330.0, 323.5], [291.0, 334.5], [287.5, 339.0], [285.5, 348.0], [283.5, 351.0]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'car', 'points': [[69.0, 334.5], [62.0, 334.5], [54.0, 331.5], [47.0, 331.5], [39.0, 329.5], [29.5, 318.0], [27.5, 313.0], [23.0, 308.5], [19.0, 307.5], [14.5, 304.0], [15.5, 302.0], [13.5, 299.0], [13.5, 296.0], [10.5, 294.0], [12.5, 293.0], [12.0, 291.5], [5.0, 291.5], [4.0, 292.5], [0.5, 291.0], [0.5, 270.0], [8.0, 268.5], [10.0, 269.5], [18.0, 269.5], [19.0, 268.5], [20.0, 269.5], [35.0, 269.5], [44.0, 267.5], [47.0, 265.5], [52.0, 265.5], [55.0, 264.5], [56.0, 262.5], [62.0, 260.5], [68.0, 254.5], [74.0, 252.5], [77.0, 249.5], [79.0, 249.5], [89.0, 243.5], [92.0, 244.5], [98.0, 242.5], [101.0, 243.5], [112.0, 242.5], [115.5, 241.0], [114.5, 238.0], [116.0, 236.5], [121.5, 234.0], [105.0, 233.5], [105.0, 231.5], [121.0, 230.5], [122.0, 229.5], [184.0, 228.5], [185.0, 229.5], [206.0, 229.5], [215.5, 232.0], [216.5, 236.0], [203.0, 247.5], [197.0, 251.5], [191.0, 251.5], [187.0, 253.5], [182.0, 263.5], [162.0, 266.5], [144.0, 272.5], [139.5, 277.0], [137.5, 284.0], [132.5, 291.0], [124.5, 320.0], [117.0, 323.5], [114.0, 328.5], [110.0, 330.5], [106.0, 330.5], [104.0, 333.5], [101.0, 330.5], [96.0, 331.5], [92.0, 330.5], [81.0, 331.5], [79.0, 330.5], [77.0, 333.5], [75.0, 331.5], [73.0, 333.5]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'parking', 'points': [[227.0, 383.5], [219.0, 380.5], [204.0, 380.5], [182.0, 377.5], [158.0, 377.5], [154.0, 379.5], [150.0, 375.5], [146.0, 375.5], [139.0, 378.5], [116.0, 378.5], [84.5, 374.0], [86.0, 372.5], [96.5, 373.0], [93.0, 370.5], [80.0, 370.5], [77.0, 372.5], [38.0, 372.5], [16.0, 370.5], [7.0, 365.5], [0.5, 366.0], [0.5, 339.0], [13.0, 341.5], [53.0, 341.5], [77.0, 345.5], [97.0, 345.5], [115.0, 340.5], [124.0, 340.5], [128.0, 345.5], [134.0, 347.5], [147.0, 348.5], [160.0, 352.5], [200.0, 352.5], [209.0, 353.5], [214.0, 356.5], [223.0, 355.5], [229.0, 357.5], [231.0, 355.5], [242.0, 355.5], [260.5, 363.0], [255.0, 365.5], [266.0, 366.5], [270.5, 370.0], [269.0, 375.5], [258.0, 381.5], [241.0, 380.5], [229.0, 381.5]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'person', 'points': [[462.0, 397.5], [460.5, 397.0], [460.5, 390.0], [459.5, 389.0], [460.5, 388.0], [460.5, 387.0], [459.5, 386.0], [459.5, 385.0], [456.5, 382.0], [456.5, 380.0], [455.0, 379.5], [453.5, 378.0], [453.5, 376.0], [451.5, 374.0], [451.5, 373.0], [448.5, 370.0], [448.5, 368.0], [447.5, 367.0], [447.5, 365.0], [447.0, 364.5], [445.0, 364.5], [444.0, 363.5], [440.0, 363.5], [439.0, 364.5], [436.0, 364.5], [435.5, 364.0], [435.5, 360.0], [434.5, 359.0], [434.5, 356.0], [432.5, 354.0], [432.5, 352.0], [431.0, 350.5], [430.0, 350.5], [426.5, 347.0], [426.5, 346.0], [425.5, 345.0], [424.5, 342.0], [421.5, 339.0], [421.5, 338.0], [419.5, 335.0], [419.5, 334.0], [418.5, 333.0], [418.5, 327.0], [419.5, 326.0], [419.5, 323.0], [420.5, 322.0], [420.5, 321.0], [419.0, 320.5], [416.5, 318.0], [416.5, 314.0], [417.5, 313.0], [417.5, 310.0], [418.5, 309.0], [418.5, 308.0], [421.0, 305.5], [427.0, 305.5], [429.5, 307.0], [429.5, 308.0], [430.5, 309.0], [431.5, 312.0], [436.5, 317.0], [435.5, 318.0], [435.5, 320.0], [437.0, 320.5], [445.5, 329.0], [445.5, 330.0], [447.0, 331.5], [448.0, 331.5], [450.0, 333.5], [452.0, 333.5], [453.0, 334.5], [454.0, 334.5], [455.5, 336.0], [454.0, 336.5], [452.5, 338.0], [452.5, 339.0], [457.5, 342.0], [459.5, 348.0], [463.0, 351.5], [464.5, 352.0], [464.5, 360.0], [463.5, 361.0], [463.5, 364.0], [464.0, 364.5], [467.0, 364.5], [467.5, 365.0], [467.5, 367.0], [469.5, 370.0], [469.5, 375.0], [468.0, 375.5], [465.5, 378.0], [468.5, 381.0], [469.0, 382.5], [473.0, 382.5], [475.5, 386.0], [475.5, 388.0], [474.5, 389.0], [474.5, 392.0], [473.0, 393.5], [469.0, 393.5], [468.0, 392.5], [467.0, 392.5], [465.5, 391.0], [465.5, 389.0], [464.0, 388.5], [463.5, 389.0], [463.5, 391.0], [462.5, 392.0], [462.5, 397.0]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}]
Traceback (most recent call last):
File "/home/amodpatil/pytorch-segmentation/labelme2voc.py", line 103, in
main()
File "/home/amodpatil/pytorch-segmentation/labelme2voc.py", line 83, in main
lbl, _ = labelme.utils.shapes_to_label(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/amodpatil/miniconda3/lib/python3.12/site-packages/labelme/utils/shape.py", line 68, in shapes_to_label
cls_id = label_name_to_value[cls_name]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'car'

What OS are you using?

Ubuntu 20.04

Describe the Bug

python labelme2voc.py /home/amodpatil/semantic_dataset/segmentation /home/amodpatil/semantic_dataset/am --labels /home/amodpatil/pytorch-segmentation/datasets/labels.txt
Creating dataset: /home/amodpatil/semantic_dataset/am
Generating dataset from: /home/amodpatil/semantic_dataset/segmentation/left2306.json
Label name to value dictionary: {'vegetation': 1, 'traffic-light': 2, 'road': 3, 'sidewalk': 4, 'parking': 5, 'building': 6}
Shapes: [{'label': 'sidewalk', 'points': [[586.0, 413.5], [552.0, 412.5], [551.0, 411.5], [547.0, 411.5], [546.0, 410.5], [533.0, 410.5], [532.0, 409.5], [512.0, 408.5], [509.0, 406.5], [507.0, 407.5], [506.0, 406.5], [492.0, 406.5], [491.0, 405.5], [482.0, 405.5], [481.0, 404.5], [477.0, 403.5], [475.5, 402.0], [475.5, 399.0], [481.5, 394.0], [481.5, 392.0], [480.5, 391.0], [481.5, 386.0], [480.5, 384.0], [476.5, 381.0], [473.5, 375.0], [473.5, 372.0], [471.5, 368.0], [470.5, 361.0], [469.5, 360.0], [469.5, 354.0], [467.5, 350.0], [467.5, 342.0], [466.5, 341.0], [466.5, 338.0], [463.0, 333.5], [461.0, 333.5], [458.5, 332.0], [456.5, 330.0], [456.5, 328.0], [460.0, 326.5], [475.0, 326.5], [476.0, 327.5], [487.0, 327.5], [488.0, 328.5], [511.0, 328.5], [512.0, 329.5], [525.0, 329.5], [526.0, 328.5], [535.0, 328.5], [536.0, 327.5], [542.0, 327.5], [543.0, 328.5], [545.0, 328.5], [546.0, 327.5], [553.0, 327.5], [554.0, 328.5], [556.0, 327.5], [559.0, 327.5], [560.0, 328.5], [575.0, 329.5], [575.0, 331.5], [577.0, 331.5], [578.0, 332.5], [583.0, 332.5], [639.0, 332.70833333333337], [639.0, 338.95833333333337], [639.0, 347.2916666666667], [639.0, 363.95833333333337], [639.0, 372.2916666666667], [639.0, 368.12500000000006], [639.0, 386.0416666666667], [639.0, 383.5416666666667], [639.0, 393.95833333333337], [639.0, 405.62500000000006], [637.2916666666666, 419.37500000000006], [617.7083333333334, 419.7916666666667], [589.5, 412.0]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'sidewalk', 'points': [[412.0, 393.5], [391.0, 393.5], [390.0, 392.5], [379.0, 392.5], [378.0, 391.5], [371.0, 391.5], [370.0, 390.5], [362.0, 390.5], [361.0, 389.5], [347.0, 389.5], [346.0, 388.5], [337.0, 388.5], [336.0, 387.5], [325.0, 387.5], [324.0, 386.5], [281.0, 385.5], [280.0, 384.5], [272.0, 383.5], [270.0, 381.5], [267.0, 381.5], [265.5, 380.0], [269.0, 378.5], [269.5, 377.0], [275.0, 372.5], [277.0, 372.5], [291.0, 365.5], [293.0, 365.5], [295.0, 363.5], [302.0, 362.5], [305.0, 359.5], [307.0, 358.5], [310.0, 358.5], [315.0, 355.5], [317.0, 355.5], [325.0, 350.5], [328.0, 350.5], [329.0, 349.5], [332.0, 349.5], [335.0, 347.5], [337.0, 347.5], [340.0, 344.5], [349.0, 340.5], [354.0, 336.5], [362.0, 336.5], [363.0, 335.5], [368.0, 334.5], [371.0, 332.5], [373.0, 332.5], [376.0, 330.5], [378.0, 330.5], [381.0, 328.5], [383.0, 328.5], [384.0, 327.5], [389.0, 327.5], [396.0, 333.5], [401.0, 335.5], [402.5, 337.0], [403.5, 343.0], [404.5, 344.0], [402.5, 347.0], [402.5, 365.0], [403.5, 366.0], [404.5, 372.0], [406.5, 375.0], [406.5, 377.0], [409.5, 384.0], [409.5, 390.0], [412.5, 392.0]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'road', 'points': [[521.0, 479.0], [506.0, 475.5], [502.0, 467.5], [499.5, 469.0], [502.5, 476.0], [496.0, 476.5], [493.5, 461.0], [463.0, 433.5], [452.0, 438.5], [449.0, 432.5], [442.0, 434.5], [439.0, 430.5], [410.5, 429.0], [440.0, 426.5], [399.0, 423.5], [324.0, 427.5], [283.0, 433.5], [285.0, 437.5], [281.0, 437.5], [279.0, 432.5], [274.5, 434.0], [277.5, 436.0], [275.0, 437.5], [241.0, 432.5], [179.0, 434.5], [136.0, 444.5], [69.0, 448.5], [1.0, 465.5], [0.5, 365.0], [9.0, 360.5], [11.0, 366.5], [21.0, 369.5], [104.0, 368.5], [105.0, 371.5], [82.0, 369.5], [80.5, 373.0], [112.0, 377.5], [140.0, 377.5], [144.0, 372.5], [159.0, 371.5], [160.5, 376.0], [155.5, 380.0], [158.0, 381.5], [217.0, 386.5], [229.0, 381.5], [248.0, 380.5], [249.0, 377.5], [253.0, 380.5], [254.0, 376.5], [256.0, 382.5], [272.0, 381.5], [282.0, 386.5], [310.0, 387.5], [312.0, 390.5], [389.0, 394.5], [421.0, 398.5], [422.0, 401.5], [479.0, 406.5], [481.0, 410.5], [553.0, 413.5], [549.5, 417.0], [559.0, 417.5], [561.0, 421.5], [611.0, 420.5], [620.5, 422.0], [615.0, 425.5], [635.5, 427.0], [620.0, 428.5], [619.0, 431.5], [616.0, 428.5], [597.0, 431.5], [594.0, 428.5], [590.0, 431.5], [584.0, 428.5], [577.0, 431.5], [572.0, 427.5], [548.0, 431.5], [541.0, 428.5], [540.0, 431.5], [521.0, 431.5], [519.0, 434.5], [512.0, 430.5], [509.5, 440.0], [502.0, 438.5], [499.0, 446.5], [492.0, 439.5], [490.5, 450.0], [502.0, 461.5], [514.0, 466.5], [520.5, 462.0]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'car', 'points': [[276.0, 356.5], [259.0, 356.5], [251.0, 348.5], [238.0, 348.5], [237.0, 347.5], [231.0, 348.5], [229.0, 346.5], [226.0, 346.5], [224.0, 348.5], [222.0, 346.5], [217.0, 345.5], [216.0, 346.5], [207.0, 345.5], [206.0, 346.5], [197.0, 345.5], [193.0, 346.5], [180.0, 344.5], [167.0, 344.5], [165.0, 342.5], [137.0, 341.5], [133.5, 338.0], [130.5, 330.0], [130.5, 308.0], [133.5, 294.0], [136.5, 288.0], [140.5, 284.0], [141.5, 278.0], [145.0, 274.5], [152.0, 271.5], [170.0, 269.5], [171.0, 267.5], [178.0, 267.5], [181.0, 265.5], [186.0, 265.5], [193.0, 262.5], [207.0, 247.5], [213.0, 244.5], [220.0, 237.5], [231.0, 235.5], [246.0, 235.5], [247.0, 234.5], [253.0, 235.5], [264.0, 233.5], [280.0, 235.5], [295.0, 234.5], [318.0, 237.5], [334.0, 242.5], [351.5, 261.0], [353.5, 266.0], [356.5, 288.0], [359.5, 295.0], [360.5, 302.0], [360.5, 317.0], [358.5, 324.0], [354.0, 327.5], [346.0, 328.5], [339.0, 327.5], [334.0, 323.5], [330.0, 323.5], [291.0, 334.5], [287.5, 339.0], [285.5, 348.0], [283.5, 351.0]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'car', 'points': [[69.0, 334.5], [62.0, 334.5], [54.0, 331.5], [47.0, 331.5], [39.0, 329.5], [29.5, 318.0], [27.5, 313.0], [23.0, 308.5], [19.0, 307.5], [14.5, 304.0], [15.5, 302.0], [13.5, 299.0], [13.5, 296.0], [10.5, 294.0], [12.5, 293.0], [12.0, 291.5], [5.0, 291.5], [4.0, 292.5], [0.5, 291.0], [0.5, 270.0], [8.0, 268.5], [10.0, 269.5], [18.0, 269.5], [19.0, 268.5], [20.0, 269.5], [35.0, 269.5], [44.0, 267.5], [47.0, 265.5], [52.0, 265.5], [55.0, 264.5], [56.0, 262.5], [62.0, 260.5], [68.0, 254.5], [74.0, 252.5], [77.0, 249.5], [79.0, 249.5], [89.0, 243.5], [92.0, 244.5], [98.0, 242.5], [101.0, 243.5], [112.0, 242.5], [115.5, 241.0], [114.5, 238.0], [116.0, 236.5], [121.5, 234.0], [105.0, 233.5], [105.0, 231.5], [121.0, 230.5], [122.0, 229.5], [184.0, 228.5], [185.0, 229.5], [206.0, 229.5], [215.5, 232.0], [216.5, 236.0], [203.0, 247.5], [197.0, 251.5], [191.0, 251.5], [187.0, 253.5], [182.0, 263.5], [162.0, 266.5], [144.0, 272.5], [139.5, 277.0], [137.5, 284.0], [132.5, 291.0], [124.5, 320.0], [117.0, 323.5], [114.0, 328.5], [110.0, 330.5], [106.0, 330.5], [104.0, 333.5], [101.0, 330.5], [96.0, 331.5], [92.0, 330.5], [81.0, 331.5], [79.0, 330.5], [77.0, 333.5], [75.0, 331.5], [73.0, 333.5]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'parking', 'points': [[227.0, 383.5], [219.0, 380.5], [204.0, 380.5], [182.0, 377.5], [158.0, 377.5], [154.0, 379.5], [150.0, 375.5], [146.0, 375.5], [139.0, 378.5], [116.0, 378.5], [84.5, 374.0], [86.0, 372.5], [96.5, 373.0], [93.0, 370.5], [80.0, 370.5], [77.0, 372.5], [38.0, 372.5], [16.0, 370.5], [7.0, 365.5], [0.5, 366.0], [0.5, 339.0], [13.0, 341.5], [53.0, 341.5], [77.0, 345.5], [97.0, 345.5], [115.0, 340.5], [124.0, 340.5], [128.0, 345.5], [134.0, 347.5], [147.0, 348.5], [160.0, 352.5], [200.0, 352.5], [209.0, 353.5], [214.0, 356.5], [223.0, 355.5], [229.0, 357.5], [231.0, 355.5], [242.0, 355.5], [260.5, 363.0], [255.0, 365.5], [266.0, 366.5], [270.5, 370.0], [269.0, 375.5], [258.0, 381.5], [241.0, 380.5], [229.0, 381.5]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}, {'label': 'person', 'points': [[462.0, 397.5], [460.5, 397.0], [460.5, 390.0], [459.5, 389.0], [460.5, 388.0], [460.5, 387.0], [459.5, 386.0], [459.5, 385.0], [456.5, 382.0], [456.5, 380.0], [455.0, 379.5], [453.5, 378.0], [453.5, 376.0], [451.5, 374.0], [451.5, 373.0], [448.5, 370.0], [448.5, 368.0], [447.5, 367.0], [447.5, 365.0], [447.0, 364.5], [445.0, 364.5], [444.0, 363.5], [440.0, 363.5], [439.0, 364.5], [436.0, 364.5], [435.5, 364.0], [435.5, 360.0], [434.5, 359.0], [434.5, 356.0], [432.5, 354.0], [432.5, 352.0], [431.0, 350.5], [430.0, 350.5], [426.5, 347.0], [426.5, 346.0], [425.5, 345.0], [424.5, 342.0], [421.5, 339.0], [421.5, 338.0], [419.5, 335.0], [419.5, 334.0], [418.5, 333.0], [418.5, 327.0], [419.5, 326.0], [419.5, 323.0], [420.5, 322.0], [420.5, 321.0], [419.0, 320.5], [416.5, 318.0], [416.5, 314.0], [417.5, 313.0], [417.5, 310.0], [418.5, 309.0], [418.5, 308.0], [421.0, 305.5], [427.0, 305.5], [429.5, 307.0], [429.5, 308.0], [430.5, 309.0], [431.5, 312.0], [436.5, 317.0], [435.5, 318.0], [435.5, 320.0], [437.0, 320.5], [445.5, 329.0], [445.5, 330.0], [447.0, 331.5], [448.0, 331.5], [450.0, 333.5], [452.0, 333.5], [453.0, 334.5], [454.0, 334.5], [455.5, 336.0], [454.0, 336.5], [452.5, 338.0], [452.5, 339.0], [457.5, 342.0], [459.5, 348.0], [463.0, 351.5], [464.5, 352.0], [464.5, 360.0], [463.5, 361.0], [463.5, 364.0], [464.0, 364.5], [467.0, 364.5], [467.5, 365.0], [467.5, 367.0], [469.5, 370.0], [469.5, 375.0], [468.0, 375.5], [465.5, 378.0], [468.5, 381.0], [469.0, 382.5], [473.0, 382.5], [475.5, 386.0], [475.5, 388.0], [474.5, 389.0], [474.5, 392.0], [473.0, 393.5], [469.0, 393.5], [468.0, 392.5], [467.0, 392.5], [465.5, 391.0], [465.5, 389.0], [464.0, 388.5], [463.5, 389.0], [463.5, 391.0], [462.5, 392.0], [462.5, 397.0]], 'shape_type': 'polygon', 'flags': {}, 'description': '', 'group_id': None, 'mask': None, 'other_data': {}}]
Traceback (most recent call last):
File "/home/amodpatil/pytorch-segmentation/labelme2voc.py", line 103, in
main()
File "/home/amodpatil/pytorch-segmentation/labelme2voc.py", line 83, in main
lbl, _ = labelme.utils.shapes_to_label(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/amodpatil/miniconda3/lib/python3.12/site-packages/labelme/utils/shape.py", line 68, in shapes_to_label
cls_id = label_name_to_value[cls_name]
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'car'

Expected Behavior

not providing an output

To Reproduce

It should the labels.txt with all the labels in it

@amodpatil1 amodpatil1 added the bug issue label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue
Projects
None yet
Development

No branches or pull requests

1 participant