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

Semantic Segmentation Issue #1171

Open
dokunima opened this issue Apr 26, 2023 · 0 comments
Open

Semantic Segmentation Issue #1171

dokunima opened this issue Apr 26, 2023 · 0 comments

Comments

@dokunima
Copy link

dokunima commented Apr 26, 2023

I am following the semantic segmentation tutorial to train a custom one-class dataset but I get the error below when I want to visualize the data or train the model. I will be grateful if anyone can suggest how I can fix this error.


AttributeError                            Traceback (most recent call last)

[<ipython-input-104-d5499f594444>](https://localhost:8080/#) in <cell line: 2>()
      1 sample_records = random.choices(train_records, k=3)
----> 2 show_records(sample_records, ncols=3)

5 frames

[/usr/local/lib/python3.9/dist-packages/icevision/visualize/draw_data.py](https://localhost:8080/#) in draw_sample(sample, class_map, denormalize_fn, display_label, display_bbox, display_score, display_mask, display_keypoints, font_path, font_size, label_color, label_border_color, label_thin_border, label_pad_width_factor, label_pad_height_factor, mask_blend, mask_border_thickness, color_map, prettify, prettify_func, return_as_pil_img, exclude_labels, include_only, multiple_classification_spacing_factor, dynamic_font_size_div_factor, include_classification_task_names, include_instances_task_names, force_mask_file_reload)
     91     for task, composite in sample.task_composites.items():
     92         if task == "segmentation":
---> 93             cm = rand_cmap(sample.segmentation.class_map.num_classes, verbose=False)
     94             if composite.mask_array is None:
     95                 if isinstance(composite.masks[0], RLE):

AttributeError: 'list' object has no attribute 'num_classes'

Thank you.

@lgvaz @FraPochetti @dnth @rsomani95 @jerbly

@dokunima dokunima changed the title Sematic Segmentation Issue Semnatic Segmentation Issue Apr 26, 2023
@dokunima dokunima changed the title Semnatic Segmentation Issue Semantic Segmentation Issue Apr 26, 2023
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

1 participant