Skip to content

Commit 26b77cb

Browse files
No public description
PiperOrigin-RevId: 838928729
1 parent 75be6d6 commit 26b77cb

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

  • official/projects/waste_identification_ml/llm_applications/milk_pouch_detection

official/projects/waste_identification_ml/llm_applications/milk_pouch_detection/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,44 @@
33
This pipeline detects and extracts dairy product packets from a folder of image
44
frames.
55

6+
## Workflow
7+
<!-- disableFinding(SNIPPET_INVALID_LANGUAGE) -->
8+
```mermaid
9+
graph TD
10+
Start([Start Pipeline]) --> Init[Parse GCS Path & Batch Size]
11+
Init --> ListFiles["List all image files from GCS<br/>(excluding 'predictions/' folder)"]
12+
ListFiles --> BatchLoop{More files to process?}
13+
14+
subgraph Batch_Processing [Batch Processing Cycle]
15+
direction TB
16+
BatchLoop -- Yes --> Clear[Clear local input/output directories]
17+
Clear --> Download[Download batch to 'input_images/']
18+
19+
Download --> ExtractScript[Run extract_objects.py]
20+
21+
subgraph Extraction [Object Extraction]
22+
ExtractScript --> Detect[Detect & Segment Objects]
23+
Detect --> Filter[Filter Masks by Area]
24+
Filter --> SaveCrops[Save cropped objects to 'objects_for_classification/']
25+
end
26+
27+
SaveCrops --> ClassifyScript[Run classify_images.py]
28+
29+
subgraph Classification [Object Classification]
30+
ClassifyScript --> Predict[Classify Crops using ViT]
31+
Predict --> Sort{Is Dairy?}
32+
Sort -- Yes --> SaveDairy[Move to 'predictions/dairy/']
33+
Sort -- No --> SaveOther[Move to 'predictions/others/']
34+
end
35+
36+
SaveDairy --> Upload[Upload 'predictions/' to GCS]
37+
SaveOther --> Upload
38+
end
39+
40+
Upload --> BatchLoop
41+
BatchLoop -- No --> End([End Pipeline])
42+
```
43+
644
We offer two types of deployment approaches:
745

846
## Deployment Approaches

0 commit comments

Comments
 (0)