-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
AssertionError occurs in function show_result() of inference.py when class_names has only one class #1570
Comments
Thanks! The behavior is intended. If there is only one class, the class names should be |
Thank your reply! |
Hi, I just test
Could you provide a more concrete example where error will occur? |
How to checkout the |
|
Sorry, it's my fault. I checked the My mistake: My issue has been solved. Thank you very much! |
@xuhuasheng How to label a single category with labelme and instance segmentation? There are cat, cat, cat, cat0, cat1, cat2 or cat-0, cat-1, cat-2, etc. which annotation method is used?thank you! I use cat-0, cat-1, cat-2 for annotation, and use labelme2coco to convert annotations.json, where the annotation is [], what's the matter? |
* [security] Updated pillow and numpy # safety check +============================+===========+=====================================+ | REPORT | | checked 148 packages, using free DB (updated once a month) | +============================+===========+==========================+==========+ | package | installed | affected | ID | +============================+===========+==========================+==========+ | pillow | 8.3.2 | <9.0.0 | 44487 | | pillow | 8.3.2 | <9.0.0 | 44485 | | pillow | 8.3.2 | <9.0.0 | 44524 | | pillow | 8.3.2 | <9.0.0 | 44525 | | pillow | 8.3.2 | <9.0.0 | 44486 | | numpy | 1.21.5 | <1.22.0 | 44716 | | numpy | 1.21.5 | <1.22.0 | 44717 | | numpy | 1.21.5 | >0 | 44715 | +==============================================================================+ * Updated tests to use smaller version of covertype for multiclass tests * Updated tests to use smaller version of covertype for multiclass tests
Checklist
Describe the bug
the bug is in
mmdet/apis/inference.py -line 116
assert isinstance(class_names, (tuple, list))
the bug will arise when there is only one class in
class_names
, which will raiseAssertionError
Environment
Error traceback
Bug fix
the bug above will be fixed by modifing
mmdet/apis/inference.py , line 116
modify
assert isinstance(class_names, (tuple, list))
to
assert isinstance(class_names, (tuple, list, str))
The text was updated successfully, but these errors were encountered: