instance
COCOInstanceCache
Bases: InstanceSegmentationCache
Cache handler that stores data in MS-COCO format. This is currently only used for instance segmentation models, but could in principle be extended to support semantic/panoptic segmentation in the future. This method is convenient for instance detection because it allows intermediate results to be easily inspected using standard annotation tools.
Source code in src/tcd_pipeline/cache/instance.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
|
save(instances, bbox)
Save cached results in MS-COCO format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instances
|
List[ProcessedInstance]
|
a list of instances to cache |
required |
bbox
|
box
|
tile bounding box in global image coordinates |
required |
Source code in src/tcd_pipeline/cache/instance.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
|
InstanceSegmentationCache
Bases: ResultsCache
A cache format that can store instance segmentation results. The input to, and output from, the cache is a list of ProcessedInstances.
Source code in src/tcd_pipeline/cache/instance.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
results: List[dict]
property
A list of results that were stored in the cache folder. Each entry in the list is a dictionary containing the following keys:
- bbox: Bbox
- image: str
- instances : List[ProcessedInstance]
PickleInstanceCache
Bases: InstanceSegmentationCache
Source code in src/tcd_pipeline/cache/instance.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|