(anns)
| 91 | num_before = len(dataset_dicts) |
| 92 | |
| 93 | def valid(anns): |
| 94 | for ann in anns: |
| 95 | if isinstance(ann, list): |
| 96 | for instance in ann: |
| 97 | if instance.get("iscrowd", 0) == 0: |
| 98 | return True |
| 99 | else: |
| 100 | if ann.get("iscrowd", 0) == 0: |
| 101 | return True |
| 102 | return False |
| 103 | |
| 104 | dataset_dicts = [x for x in dataset_dicts if valid(x["annotations"])] |
| 105 | num_after = len(dataset_dicts) |
no outgoing calls
no test coverage detected