| 460 | } |
| 461 | |
| 462 | void CocoLoader::ParsePreprocessedAnnotations() { |
| 463 | assert(HasPreprocessedAnnotations(spec_)); |
| 464 | const auto path = spec_.HasArgument("meta_files_path") |
| 465 | ? spec_.GetArgument<string>("meta_files_path") |
| 466 | : spec_.GetArgument<string>("preprocessed_annotations"); |
| 467 | using detail::LoadFromFile; |
| 468 | LoadFromFile(offsets_, path + "/offsets.dat"); |
| 469 | LoadFromFile(boxes_, path + "/boxes.dat"); |
| 470 | LoadFromFile(labels_, path + "/labels.dat"); |
| 471 | LoadFromFile(counts_, path + "/counts.dat"); |
| 472 | LoadFromFile(file_label_entries_, path + "/filenames.dat"); |
| 473 | |
| 474 | if (output_polygon_masks_ || output_pixelwise_masks_) { |
| 475 | LoadFromFile(polygon_data_, path + "/polygon_data.dat"); |
| 476 | LoadFromFile(polygon_offset_, path + "/polygon_offset.dat"); |
| 477 | LoadFromFile(polygon_count_, path + "/polygons_count.dat"); |
| 478 | LoadFromFile(vertices_data_, path + "/vertices.dat"); |
| 479 | LoadFromFile(vertices_offset_, path + "/vertices_offset.dat"); |
| 480 | LoadFromFile(vertices_count_, path + "/vertices_count.dat"); |
| 481 | } |
| 482 | |
| 483 | if (output_pixelwise_masks_) { |
| 484 | LoadFromFile(masks_rles_, path + "/masks_rles.dat"); |
| 485 | LoadFromFile(masks_rles_idx_, path + "/masks_rles_idx.dat"); |
| 486 | LoadFromFile(mask_offsets_, path + "/masks_offset.dat"); |
| 487 | LoadFromFile(mask_counts_, path + "/mask_count.dat"); |
| 488 | LoadFromFile(heights_, path + "/heights.dat"); |
| 489 | LoadFromFile(widths_, path + "/widths.dat"); |
| 490 | } |
| 491 | |
| 492 | if (output_image_ids_) { |
| 493 | LoadFromFile(original_ids_, path + "/original_ids.dat"); |
| 494 | } |
| 495 | } |
| 496 | |
| 497 | void CocoLoader::ParseJsonAnnotations() { |
| 498 | std::vector<detail::ImageInfo> image_infos; |
nothing calls this directly
no test coverage detected