@souscheflabs/ml-vision 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/LICENSE +15 -0
- package/README.md +50 -5
- package/dist/{components → cjs/components}/DetectionOverlay.js +1 -0
- package/dist/cjs/components/DetectionOverlay.js.map +1 -0
- package/dist/{components → cjs/components}/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -0
- package/dist/{core → cjs/core}/CacheManager.js +1 -0
- package/dist/cjs/core/CacheManager.js.map +1 -0
- package/dist/{core → cjs/core}/MLVisionProvider.js +4 -2
- package/dist/cjs/core/MLVisionProvider.js.map +1 -0
- package/dist/{core → cjs/core}/ServerClient.js +33 -13
- package/dist/cjs/core/ServerClient.js.map +1 -0
- package/dist/{core → cjs/core}/index.js +1 -0
- package/dist/cjs/core/index.js.map +1 -0
- package/dist/cjs/hooks/classLabels.js +178 -0
- package/dist/cjs/hooks/classLabels.js.map +1 -0
- package/dist/{hooks → cjs/hooks}/classLabelsCoco.js +1 -0
- package/dist/cjs/hooks/classLabelsCoco.js.map +1 -0
- package/dist/{hooks → cjs/hooks}/index.js +1 -0
- package/dist/cjs/hooks/index.js.map +1 -0
- package/dist/{hooks → cjs/hooks}/useMultiBarcodeScanner.js +6 -3
- package/dist/cjs/hooks/useMultiBarcodeScanner.js.map +1 -0
- package/dist/{hooks → cjs/hooks}/useProductDetector.js +168 -97
- package/dist/cjs/hooks/useProductDetector.js.map +1 -0
- package/dist/{hooks → cjs/hooks}/useReceiptScanner.js +60 -52
- package/dist/cjs/hooks/useReceiptScanner.js.map +1 -0
- package/dist/{hooks → cjs/hooks}/useVideoScanner.js +8 -5
- package/dist/cjs/hooks/useVideoScanner.js.map +1 -0
- package/dist/{index.js → cjs/index.js} +8 -4
- package/dist/cjs/index.js.map +1 -0
- package/dist/{processors → cjs/processors}/detectionProcessor.js +1 -0
- package/dist/cjs/processors/detectionProcessor.js.map +1 -0
- package/dist/{processors → cjs/processors}/index.js +1 -0
- package/dist/cjs/processors/index.js.map +1 -0
- package/dist/{processors → cjs/processors}/tfliteFrameProcessor.js +108 -25
- package/dist/cjs/processors/tfliteFrameProcessor.js.map +1 -0
- package/dist/{types → cjs/types}/barcode.js +1 -0
- package/dist/cjs/types/barcode.js.map +1 -0
- package/dist/{types → cjs/types}/detection.js +1 -0
- package/dist/cjs/types/detection.js.map +1 -0
- package/dist/{types → cjs/types}/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/{types → cjs/types}/ocr.js +1 -0
- package/dist/cjs/types/ocr.js.map +1 -0
- package/dist/{utils → cjs/utils}/imagePreprocessor.js +30 -25
- package/dist/cjs/utils/imagePreprocessor.js.map +1 -0
- package/dist/cjs/utils/logger.js +99 -0
- package/dist/cjs/utils/logger.js.map +1 -0
- package/dist/{utils → cjs/utils}/yoloProcessor.js +1 -0
- package/dist/cjs/utils/yoloProcessor.js.map +1 -0
- package/dist/esm/components/DetectionOverlay.js +130 -0
- package/dist/esm/components/DetectionOverlay.js.map +1 -0
- package/dist/esm/components/index.js +5 -0
- package/dist/esm/components/index.js.map +1 -0
- package/dist/esm/core/CacheManager.js +327 -0
- package/dist/esm/core/CacheManager.js.map +1 -0
- package/dist/esm/core/MLVisionProvider.js +185 -0
- package/dist/esm/core/MLVisionProvider.js.map +1 -0
- package/dist/esm/core/ServerClient.js +305 -0
- package/dist/esm/core/ServerClient.js.map +1 -0
- package/dist/esm/core/index.js +7 -0
- package/dist/esm/core/index.js.map +1 -0
- package/dist/esm/hooks/classLabels.js +174 -0
- package/dist/esm/hooks/classLabels.js.map +1 -0
- package/dist/esm/hooks/classLabelsCoco.js +98 -0
- package/dist/esm/hooks/classLabelsCoco.js.map +1 -0
- package/dist/esm/hooks/index.js +9 -0
- package/dist/esm/hooks/index.js.map +1 -0
- package/dist/esm/hooks/useMultiBarcodeScanner.js +290 -0
- package/dist/esm/hooks/useMultiBarcodeScanner.js.map +1 -0
- package/dist/esm/hooks/useProductDetector.js +714 -0
- package/dist/esm/hooks/useProductDetector.js.map +1 -0
- package/dist/esm/hooks/useReceiptScanner.js +407 -0
- package/dist/esm/hooks/useReceiptScanner.js.map +1 -0
- package/dist/esm/hooks/useVideoScanner.js +383 -0
- package/dist/esm/hooks/useVideoScanner.js.map +1 -0
- package/dist/esm/index.js +93 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/processors/detectionProcessor.js +121 -0
- package/dist/esm/processors/detectionProcessor.js.map +1 -0
- package/dist/esm/processors/index.js +7 -0
- package/dist/esm/processors/index.js.map +1 -0
- package/dist/esm/processors/tfliteFrameProcessor.js +292 -0
- package/dist/esm/processors/tfliteFrameProcessor.js.map +1 -0
- package/dist/esm/types/barcode.js +17 -0
- package/dist/esm/types/barcode.js.map +1 -0
- package/dist/esm/types/detection.js +8 -0
- package/dist/esm/types/detection.js.map +1 -0
- package/dist/esm/types/index.js +10 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/ocr.js +8 -0
- package/dist/esm/types/ocr.js.map +1 -0
- package/dist/esm/utils/imagePreprocessor.js +268 -0
- package/dist/esm/utils/imagePreprocessor.js.map +1 -0
- package/dist/esm/utils/logger.js +94 -0
- package/dist/esm/utils/logger.js.map +1 -0
- package/dist/esm/utils/yoloProcessor.js +151 -0
- package/dist/esm/utils/yoloProcessor.js.map +1 -0
- package/dist/{components → types/components}/DetectionOverlay.d.ts +1 -0
- package/dist/types/components/DetectionOverlay.d.ts.map +1 -0
- package/dist/{components → types/components}/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -0
- package/dist/{core → types/core}/CacheManager.d.ts +1 -0
- package/dist/types/core/CacheManager.d.ts.map +1 -0
- package/dist/{core → types/core}/MLVisionProvider.d.ts +1 -0
- package/dist/types/core/MLVisionProvider.d.ts.map +1 -0
- package/dist/{core → types/core}/ServerClient.d.ts +1 -0
- package/dist/types/core/ServerClient.d.ts.map +1 -0
- package/dist/{core → types/core}/index.d.ts +1 -0
- package/dist/types/core/index.d.ts.map +1 -0
- package/dist/{hooks → types/hooks}/classLabels.d.ts +5 -4
- package/dist/types/hooks/classLabels.d.ts.map +1 -0
- package/dist/{hooks → types/hooks}/classLabelsCoco.d.ts +1 -0
- package/dist/types/hooks/classLabelsCoco.d.ts.map +1 -0
- package/dist/{hooks → types/hooks}/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts.map +1 -0
- package/dist/{hooks → types/hooks}/useMultiBarcodeScanner.d.ts +1 -0
- package/dist/types/hooks/useMultiBarcodeScanner.d.ts.map +1 -0
- package/dist/{hooks → types/hooks}/useProductDetector.d.ts +1 -0
- package/dist/types/hooks/useProductDetector.d.ts.map +1 -0
- package/dist/{hooks → types/hooks}/useReceiptScanner.d.ts +2 -1
- package/dist/types/hooks/useReceiptScanner.d.ts.map +1 -0
- package/dist/{hooks → types/hooks}/useVideoScanner.d.ts +1 -0
- package/dist/types/hooks/useVideoScanner.d.ts.map +1 -0
- package/dist/types/index.d.ts +58 -124
- package/dist/types/index.d.ts.map +1 -0
- package/dist/{processors → types/processors}/detectionProcessor.d.ts +1 -0
- package/dist/types/processors/detectionProcessor.d.ts.map +1 -0
- package/dist/{processors → types/processors}/index.d.ts +1 -0
- package/dist/types/processors/index.d.ts.map +1 -0
- package/dist/{processors → types/processors}/tfliteFrameProcessor.d.ts +5 -4
- package/dist/types/processors/tfliteFrameProcessor.d.ts.map +1 -0
- package/dist/types/{barcode.d.ts → types/barcode.d.ts} +1 -0
- package/dist/types/types/barcode.d.ts.map +1 -0
- package/dist/types/{detection.d.ts → types/detection.d.ts} +1 -0
- package/dist/types/types/detection.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +127 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/{ocr.d.ts → types/ocr.d.ts} +1 -0
- package/dist/types/types/ocr.d.ts.map +1 -0
- package/dist/{utils → types/utils}/imagePreprocessor.d.ts +1 -0
- package/dist/types/utils/imagePreprocessor.d.ts.map +1 -0
- package/dist/types/utils/logger.d.ts +52 -0
- package/dist/types/utils/logger.d.ts.map +1 -0
- package/dist/{utils → types/utils}/yoloProcessor.d.ts +1 -0
- package/dist/types/utils/yoloProcessor.d.ts.map +1 -0
- package/package.json +62 -21
- package/dist/hooks/classLabels.js +0 -439
- package/dist/index.d.ts +0 -58
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Class label mappings for the trained SousChef YOLOv8 model
|
|
4
|
-
*
|
|
5
|
-
* These labels correspond to the 233 classes in the souschef_coco_finetuned_v1 model.
|
|
6
|
-
* The model was fine-tuned on a dataset of food and kitchen items.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.CATEGORY_CLASSES = exports.NUM_CLASSES = exports.CLASS_LABELS = void 0;
|
|
10
|
-
exports.getClassInfo = getClassInfo;
|
|
11
|
-
exports.getLabelsArray = getLabelsArray;
|
|
12
|
-
exports.categorizeLabel = categorizeLabel;
|
|
13
|
-
/**
|
|
14
|
-
* Categorize a food item label
|
|
15
|
-
*/
|
|
16
|
-
function categorizeLabel(label) {
|
|
17
|
-
// Produce
|
|
18
|
-
const produce = [
|
|
19
|
-
'acorn_squash', 'apple', 'asparagus', 'baby_carrots', 'baby_spinach',
|
|
20
|
-
'banana', 'basil', 'bell_pepper', 'blackberries', 'blueberries',
|
|
21
|
-
'broccoli', 'brussels_sprouts', 'butternut_squash', 'button_mushrooms',
|
|
22
|
-
'carrot', 'cauliflower', 'celery', 'cherries', 'cherry_tomatoes',
|
|
23
|
-
'chives', 'clementine', 'coconut', 'corn', 'cucumber', 'dill',
|
|
24
|
-
'eggplant', 'english_cucumber', 'fuji_apple', 'garlic', 'ginger',
|
|
25
|
-
'grapes', 'green_bell_pepper', 'green_onion', 'honeydew_melon',
|
|
26
|
-
'jalapeno', 'kiwi', 'lemon', 'lettuce', 'lime', 'mango', 'mixed_greens',
|
|
27
|
-
'mushrooms', 'napa_cabbage', 'onion', 'orange', 'pomegranate', 'potato',
|
|
28
|
-
'raspberries', 'red_cabbage', 'red_onion', 'roma_tomato', 'romaine_lettuce',
|
|
29
|
-
'rosemary', 'sage', 'shallot', 'spinach', 'spaghetti_squash',
|
|
30
|
-
'strawberries', 'sweet_potato', 'tomatillo', 'tomato', 'white_onion',
|
|
31
|
-
'yellow_onion', 'yellow_squash', 'yukon_gold_potato', 'zucchini',
|
|
32
|
-
'd_anjou_p_r', 'd_anjou_p_rs_2_pound', 'p_es', 'p_rs', 'pe_s', 'chillies'
|
|
33
|
-
];
|
|
34
|
-
// Meat & Seafood
|
|
35
|
-
const meat = [
|
|
36
|
-
'ahi_tuna', 'bacon', 'beef_brisket', 'beef_broth', 'beef_short_ribs',
|
|
37
|
-
'beef_tenderloin', 'catfish_fillets', 'catfish_fillets_fr_en_big_d_l',
|
|
38
|
-
'catfish_st_k_sustainably_sourced', 'chicken_drumsticks', 'chicken_legs',
|
|
39
|
-
'chicken_tenders', 'chicken_thighs', 'chicken_wings', 'chuck_roast',
|
|
40
|
-
'cod', 'cod_fillet', 'filet_mignon', 'flank_steak', 'ground_beef',
|
|
41
|
-
'ground_chicken', 'ground_lamb', 'ham', 'lobster', 'pork_belly',
|
|
42
|
-
'pork_chops', 'pork_loin', 'pork_shoulder', 'pork_tenderloin',
|
|
43
|
-
'rotisserie_chicken', 'ry_catfish_fillets', 'shrimp', 'sirloin_steak',
|
|
44
|
-
'smoked_salmon', 'tilapia', 'tilapia_fillet'
|
|
45
|
-
];
|
|
46
|
-
// Dairy
|
|
47
|
-
const dairy = [
|
|
48
|
-
'blue_cheese', 'butter', 'cacique_queso_fresco', 'cheddar_cheese',
|
|
49
|
-
'cr_m', 'egg_whites', 'eggs', 'goat_cheese', 'gouda_cheese',
|
|
50
|
-
'greek_yogurt', 'h_vy_cr_m', 'half_and_half', 'large_eggs', 'milk',
|
|
51
|
-
'mozzarella_cheese', 'parmesan_cheese', 'provolone_cheese',
|
|
52
|
-
'salted_butter', 'shredded_cheese', 'skim_milk', 'sliced_cheese',
|
|
53
|
-
'soy_milk', 'unsalted_butter', 'vegan_cr_m', 'whole_milk', 'yogurt'
|
|
54
|
-
];
|
|
55
|
-
// Bakery
|
|
56
|
-
const bakery = [
|
|
57
|
-
'baguette', 'br_d', 'br_dcrumbs', 'crusty_br_d', 'hot_dog_buns',
|
|
58
|
-
'ladyfingers_bought_or', 'panko_br_d_crumbs', 'shortcrust_pastry',
|
|
59
|
-
'white_bread'
|
|
60
|
-
];
|
|
61
|
-
// Packaged/Pantry
|
|
62
|
-
const packaged = [
|
|
63
|
-
'all_purpose_flour', 'balsamic_vinegar', 'bbq_sauce', 'blackberry_preserves_seedless',
|
|
64
|
-
'blackeye_p_s', 'bonne_maman_blackberry_preserves', 'brown_rice', 'brown_sugar',
|
|
65
|
-
'cardamom_pods', 'chickpeas', 'chilli_flakes', 'citric_acid', 'crushed_tomatoes',
|
|
66
|
-
'diced_tomatoes', 'double_strength_liquid_rennet', 'extra_virgin_olive_oil',
|
|
67
|
-
'flour', 'garam_masala', 'garbanzo_b_ns', 'herbs_de_province', 'honey',
|
|
68
|
-
'hot_sauce', 'jam', 'marinara_sauce', 'mayonnaise', 'mustard',
|
|
69
|
-
'non_dairy_nutritional_y_st', 'olive_oil', 'on_the_border_monterey_jack_queso',
|
|
70
|
-
'oregano', 'paprika', 'parchment_pa_to_line_the_baking_pan', 'pasta',
|
|
71
|
-
'pinto_beans', 'polaner_with_fiber_seedless_blackberry_preserves_g',
|
|
72
|
-
'powdered_sugar', 'pre_d_pepitas', 'pumpkin_pie_spice_shaker', 'quick_p_rled_barley',
|
|
73
|
-
'rice', 's_soning', 'salsa', 'shirataki', 'spaghetti', 'stock', 'sugar',
|
|
74
|
-
'tomato_paste', 'tomato_sauce', 'unsweetened_chocolate_baking_squares',
|
|
75
|
-
'unsweetened_coconut_flakes', 'vanilla', 'vegetable_oil', 'xanthan_gum',
|
|
76
|
-
'rosemary_l_ves', 'bay_l_f'
|
|
77
|
-
];
|
|
78
|
-
// Snacks
|
|
79
|
-
const snack = [
|
|
80
|
-
'cashews', 'chifles_plantain_strips', 'granola_bar', 'kind_pumpkin_seeds',
|
|
81
|
-
'mixed_nuts', 'peanuts', 'philadelphia_snack_de_s_chocolate', 'plantain_single',
|
|
82
|
-
'pretzels', 'protein_bar', 'tortilla_chips', 'trail_mix', 'walnuts',
|
|
83
|
-
'vegan_marshmallows'
|
|
84
|
-
];
|
|
85
|
-
// Beverages
|
|
86
|
-
const beverage = [
|
|
87
|
-
'bottled_water', 'cr_m_soda', 'cranberry_juice', 'orange_juice',
|
|
88
|
-
'sparkling_water', 'bigelow_benefits_cinnamon_blackberry_herbal_t_s',
|
|
89
|
-
'ly_pulled_espresso_to', 'mamma_chia_chia_squeeze_blackberry_bliss_vitality',
|
|
90
|
-
'twinings_londin_immue_support_blackberry_flavored'
|
|
91
|
-
];
|
|
92
|
-
// Frozen
|
|
93
|
-
const frozen = [
|
|
94
|
-
'bakery_pumpkin_pie', 'frozen_fruit', 'marie_callender_s_pumpkin_pie_fr_en_dessert',
|
|
95
|
-
'microwave_the_noodles'
|
|
96
|
-
];
|
|
97
|
-
// Supplements/Other
|
|
98
|
-
const other = [
|
|
99
|
-
'melatonin_gummies_blackberry_5mg', 'olly_men_s_multivitamin_blackberry_flavored_gummy',
|
|
100
|
-
'olly_sleep_blackberry_flavor_gummy_supplement_mela',
|
|
101
|
-
'olly_strength_sleep_blackberry_flavor_gummy_supple',
|
|
102
|
-
'purina_friskies_fish_a_licious_wet_cat_in_gravy_va',
|
|
103
|
-
'spice_islands_pumpkin_pie_spice_kosher', 'grown_fairytale_pumpkin',
|
|
104
|
-
'grown_pie_pumpkins', 'grown_pumpkins_up_to_13_s', 'grown_pumpkins_up_to_19_s',
|
|
105
|
-
'la_costena_tomatillos', 'portobello_mushrooms'
|
|
106
|
-
];
|
|
107
|
-
if (produce.includes(label))
|
|
108
|
-
return 'produce';
|
|
109
|
-
if (meat.includes(label))
|
|
110
|
-
return 'meat';
|
|
111
|
-
if (dairy.includes(label))
|
|
112
|
-
return 'dairy';
|
|
113
|
-
if (bakery.includes(label))
|
|
114
|
-
return 'bakery';
|
|
115
|
-
if (packaged.includes(label))
|
|
116
|
-
return 'packaged';
|
|
117
|
-
if (snack.includes(label))
|
|
118
|
-
return 'snack';
|
|
119
|
-
if (beverage.includes(label))
|
|
120
|
-
return 'beverage';
|
|
121
|
-
if (frozen.includes(label))
|
|
122
|
-
return 'frozen';
|
|
123
|
-
if (other.includes(label))
|
|
124
|
-
return 'unknown';
|
|
125
|
-
// Default categorization based on common patterns
|
|
126
|
-
if (label.includes('cheese'))
|
|
127
|
-
return 'dairy';
|
|
128
|
-
if (label.includes('milk') || label.includes('cream') || label.includes('butter'))
|
|
129
|
-
return 'dairy';
|
|
130
|
-
if (label.includes('beef') || label.includes('chicken') || label.includes('pork') ||
|
|
131
|
-
label.includes('fish') || label.includes('shrimp') || label.includes('salmon'))
|
|
132
|
-
return 'meat';
|
|
133
|
-
if (label.includes('bread') || label.includes('bun'))
|
|
134
|
-
return 'bakery';
|
|
135
|
-
if (label.includes('juice') || label.includes('water') || label.includes('soda'))
|
|
136
|
-
return 'beverage';
|
|
137
|
-
return 'unknown';
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Map class index to label and category (233 classes)
|
|
141
|
-
*/
|
|
142
|
-
exports.CLASS_LABELS = {
|
|
143
|
-
0: { label: 'acorn_squash', category: 'produce' },
|
|
144
|
-
1: { label: 'ahi_tuna', category: 'meat' },
|
|
145
|
-
2: { label: 'all_purpose_flour', category: 'packaged' },
|
|
146
|
-
3: { label: 'apple', category: 'produce' },
|
|
147
|
-
4: { label: 'asparagus', category: 'produce' },
|
|
148
|
-
5: { label: 'baby_carrots', category: 'produce' },
|
|
149
|
-
6: { label: 'baby_spinach', category: 'produce' },
|
|
150
|
-
7: { label: 'bacon', category: 'meat' },
|
|
151
|
-
8: { label: 'baguette', category: 'bakery' },
|
|
152
|
-
9: { label: 'bakery_pumpkin_pie', category: 'frozen' },
|
|
153
|
-
10: { label: 'balsamic_vinegar', category: 'packaged' },
|
|
154
|
-
11: { label: 'banana', category: 'produce' },
|
|
155
|
-
12: { label: 'basil', category: 'produce' },
|
|
156
|
-
13: { label: 'bay_l_f', category: 'spice' },
|
|
157
|
-
14: { label: 'bbq_sauce', category: 'condiment' },
|
|
158
|
-
15: { label: 'beef_brisket', category: 'meat' },
|
|
159
|
-
16: { label: 'beef_broth', category: 'packaged' },
|
|
160
|
-
17: { label: 'beef_short_ribs', category: 'meat' },
|
|
161
|
-
18: { label: 'beef_tenderloin', category: 'meat' },
|
|
162
|
-
19: { label: 'bell_pepper', category: 'produce' },
|
|
163
|
-
20: { label: 'bigelow_benefits_cinnamon_blackberry_herbal_t_s', category: 'beverage' },
|
|
164
|
-
21: { label: 'blackberries', category: 'produce' },
|
|
165
|
-
22: { label: 'blackberry_preserves_seedless', category: 'packaged' },
|
|
166
|
-
23: { label: 'blackeye_p_s', category: 'packaged' },
|
|
167
|
-
24: { label: 'blue_cheese', category: 'dairy' },
|
|
168
|
-
25: { label: 'blueberries', category: 'produce' },
|
|
169
|
-
26: { label: 'bonne_maman_blackberry_preserves', category: 'packaged' },
|
|
170
|
-
27: { label: 'bottled_water', category: 'beverage' },
|
|
171
|
-
28: { label: 'br_d', category: 'bakery' },
|
|
172
|
-
29: { label: 'br_dcrumbs', category: 'packaged' },
|
|
173
|
-
30: { label: 'broccoli', category: 'produce' },
|
|
174
|
-
31: { label: 'brown_rice', category: 'packaged' },
|
|
175
|
-
32: { label: 'brown_sugar', category: 'packaged' },
|
|
176
|
-
33: { label: 'brussels_sprouts', category: 'produce' },
|
|
177
|
-
34: { label: 'butter', category: 'dairy' },
|
|
178
|
-
35: { label: 'butternut_squash', category: 'produce' },
|
|
179
|
-
36: { label: 'button_mushrooms', category: 'produce' },
|
|
180
|
-
37: { label: 'cacique_queso_fresco', category: 'dairy' },
|
|
181
|
-
38: { label: 'cardamom_pods', category: 'spice' },
|
|
182
|
-
39: { label: 'carrot', category: 'produce' },
|
|
183
|
-
40: { label: 'cashews', category: 'snack' },
|
|
184
|
-
41: { label: 'catfish_fillets', category: 'meat' },
|
|
185
|
-
42: { label: 'catfish_fillets_fr_en_big_d_l', category: 'meat' },
|
|
186
|
-
43: { label: 'catfish_st_k_sustainably_sourced', category: 'meat' },
|
|
187
|
-
44: { label: 'cauliflower', category: 'produce' },
|
|
188
|
-
45: { label: 'celery', category: 'produce' },
|
|
189
|
-
46: { label: 'cheddar_cheese', category: 'dairy' },
|
|
190
|
-
47: { label: 'cherries', category: 'produce' },
|
|
191
|
-
48: { label: 'cherry_tomatoes', category: 'produce' },
|
|
192
|
-
49: { label: 'chicken_drumsticks', category: 'meat' },
|
|
193
|
-
50: { label: 'chicken_legs', category: 'meat' },
|
|
194
|
-
51: { label: 'chicken_tenders', category: 'meat' },
|
|
195
|
-
52: { label: 'chicken_thighs', category: 'meat' },
|
|
196
|
-
53: { label: 'chicken_wings', category: 'meat' },
|
|
197
|
-
54: { label: 'chickpeas', category: 'packaged' },
|
|
198
|
-
55: { label: 'chifles_plantain_strips', category: 'snack' },
|
|
199
|
-
56: { label: 'chilli_flakes', category: 'spice' },
|
|
200
|
-
57: { label: 'chillies', category: 'produce' },
|
|
201
|
-
58: { label: 'chives', category: 'produce' },
|
|
202
|
-
59: { label: 'chuck_roast', category: 'meat' },
|
|
203
|
-
60: { label: 'citric_acid', category: 'packaged' },
|
|
204
|
-
61: { label: 'clementine', category: 'produce' },
|
|
205
|
-
62: { label: 'coconut', category: 'produce' },
|
|
206
|
-
63: { label: 'cod', category: 'meat' },
|
|
207
|
-
64: { label: 'cod_fillet', category: 'meat' },
|
|
208
|
-
65: { label: 'corn', category: 'produce' },
|
|
209
|
-
66: { label: 'cr_m', category: 'dairy' },
|
|
210
|
-
67: { label: 'cr_m_soda', category: 'beverage' },
|
|
211
|
-
68: { label: 'cranberry_juice', category: 'beverage' },
|
|
212
|
-
69: { label: 'crushed_tomatoes', category: 'packaged' },
|
|
213
|
-
70: { label: 'crusty_br_d', category: 'bakery' },
|
|
214
|
-
71: { label: 'cucumber', category: 'produce' },
|
|
215
|
-
72: { label: 'd_anjou_p_r', category: 'produce' },
|
|
216
|
-
73: { label: 'd_anjou_p_rs_2_pound', category: 'produce' },
|
|
217
|
-
74: { label: 'diced_tomatoes', category: 'packaged' },
|
|
218
|
-
75: { label: 'dill', category: 'produce' },
|
|
219
|
-
76: { label: 'double_strength_liquid_rennet', category: 'packaged' },
|
|
220
|
-
77: { label: 'egg_whites', category: 'dairy' },
|
|
221
|
-
78: { label: 'eggplant', category: 'produce' },
|
|
222
|
-
79: { label: 'eggs', category: 'dairy' },
|
|
223
|
-
80: { label: 'english_cucumber', category: 'produce' },
|
|
224
|
-
81: { label: 'extra_virgin_olive_oil', category: 'packaged' },
|
|
225
|
-
82: { label: 'filet_mignon', category: 'meat' },
|
|
226
|
-
83: { label: 'flank_steak', category: 'meat' },
|
|
227
|
-
84: { label: 'flour', category: 'packaged' },
|
|
228
|
-
85: { label: 'frozen_fruit', category: 'frozen' },
|
|
229
|
-
86: { label: 'fuji_apple', category: 'produce' },
|
|
230
|
-
87: { label: 'garam_masala', category: 'spice' },
|
|
231
|
-
88: { label: 'garbanzo_b_ns', category: 'packaged' },
|
|
232
|
-
89: { label: 'garlic', category: 'produce' },
|
|
233
|
-
90: { label: 'ginger', category: 'produce' },
|
|
234
|
-
91: { label: 'goat_cheese', category: 'dairy' },
|
|
235
|
-
92: { label: 'gouda_cheese', category: 'dairy' },
|
|
236
|
-
93: { label: 'granola_bar', category: 'snack' },
|
|
237
|
-
94: { label: 'grapes', category: 'produce' },
|
|
238
|
-
95: { label: 'greek_yogurt', category: 'dairy' },
|
|
239
|
-
96: { label: 'green_bell_pepper', category: 'produce' },
|
|
240
|
-
97: { label: 'green_onion', category: 'produce' },
|
|
241
|
-
98: { label: 'ground_beef', category: 'meat' },
|
|
242
|
-
99: { label: 'ground_chicken', category: 'meat' },
|
|
243
|
-
100: { label: 'ground_lamb', category: 'meat' },
|
|
244
|
-
101: { label: 'grown_fairytale_pumpkin', category: 'produce' },
|
|
245
|
-
102: { label: 'grown_pie_pumpkins', category: 'produce' },
|
|
246
|
-
103: { label: 'grown_pumpkins_up_to_13_s', category: 'produce' },
|
|
247
|
-
104: { label: 'grown_pumpkins_up_to_19_s', category: 'produce' },
|
|
248
|
-
105: { label: 'h_vy_cr_m', category: 'dairy' },
|
|
249
|
-
106: { label: 'half_and_half', category: 'dairy' },
|
|
250
|
-
107: { label: 'herbs_de_province', category: 'spice' },
|
|
251
|
-
108: { label: 'honey', category: 'packaged' },
|
|
252
|
-
109: { label: 'honeydew_melon', category: 'produce' },
|
|
253
|
-
110: { label: 'hot_dog_buns', category: 'bakery' },
|
|
254
|
-
111: { label: 'hot_sauce', category: 'condiment' },
|
|
255
|
-
112: { label: 'jalapeno', category: 'produce' },
|
|
256
|
-
113: { label: 'jam', category: 'packaged' },
|
|
257
|
-
114: { label: 'kind_pumpkin_seeds', category: 'snack' },
|
|
258
|
-
115: { label: 'kiwi', category: 'produce' },
|
|
259
|
-
116: { label: 'la_costena_tomatillos', category: 'packaged' },
|
|
260
|
-
117: { label: 'ladyfingers_bought_or', category: 'bakery' },
|
|
261
|
-
118: { label: 'large_eggs', category: 'dairy' },
|
|
262
|
-
119: { label: 'lemon', category: 'produce' },
|
|
263
|
-
120: { label: 'lettuce', category: 'produce' },
|
|
264
|
-
121: { label: 'lime', category: 'produce' },
|
|
265
|
-
122: { label: 'lobster', category: 'meat' },
|
|
266
|
-
123: { label: 'ly_pulled_espresso_to', category: 'beverage' },
|
|
267
|
-
124: { label: 'mamma_chia_chia_squeeze_blackberry_bliss_vitality', category: 'beverage' },
|
|
268
|
-
125: { label: 'mango', category: 'produce' },
|
|
269
|
-
126: { label: 'marie_callender_s_pumpkin_pie_fr_en_dessert', category: 'frozen' },
|
|
270
|
-
127: { label: 'marinara_sauce', category: 'packaged' },
|
|
271
|
-
128: { label: 'mayonnaise', category: 'condiment' },
|
|
272
|
-
129: { label: 'melatonin_gummies_blackberry_5mg', category: 'unknown' },
|
|
273
|
-
130: { label: 'microwave_the_noodles', category: 'frozen' },
|
|
274
|
-
131: { label: 'mixed_greens', category: 'produce' },
|
|
275
|
-
132: { label: 'mixed_nuts', category: 'snack' },
|
|
276
|
-
133: { label: 'mozzarella_cheese', category: 'dairy' },
|
|
277
|
-
134: { label: 'mushrooms', category: 'produce' },
|
|
278
|
-
135: { label: 'mustard', category: 'condiment' },
|
|
279
|
-
136: { label: 'napa_cabbage', category: 'produce' },
|
|
280
|
-
137: { label: 'non_dairy_nutritional_y_st', category: 'packaged' },
|
|
281
|
-
138: { label: 'olive_oil', category: 'packaged' },
|
|
282
|
-
139: { label: 'olly_men_s_multivitamin_blackberry_flavored_gummy', category: 'unknown' },
|
|
283
|
-
140: { label: 'olly_sleep_blackberry_flavor_gummy_supplement_mela', category: 'unknown' },
|
|
284
|
-
141: { label: 'olly_strength_sleep_blackberry_flavor_gummy_supple', category: 'unknown' },
|
|
285
|
-
142: { label: 'on_the_border_monterey_jack_queso', category: 'packaged' },
|
|
286
|
-
143: { label: 'onion', category: 'produce' },
|
|
287
|
-
144: { label: 'orange', category: 'produce' },
|
|
288
|
-
145: { label: 'orange_juice', category: 'beverage' },
|
|
289
|
-
146: { label: 'oregano', category: 'spice' },
|
|
290
|
-
147: { label: 'p_es', category: 'produce' },
|
|
291
|
-
148: { label: 'p_rs', category: 'produce' },
|
|
292
|
-
149: { label: 'panko_br_d_crumbs', category: 'packaged' },
|
|
293
|
-
150: { label: 'paprika', category: 'spice' },
|
|
294
|
-
151: { label: 'parchment_pa_to_line_the_baking_pan', category: 'packaged' },
|
|
295
|
-
152: { label: 'parmesan_cheese', category: 'dairy' },
|
|
296
|
-
153: { label: 'pasta', category: 'packaged' },
|
|
297
|
-
154: { label: 'pe_s', category: 'produce' },
|
|
298
|
-
155: { label: 'peanuts', category: 'snack' },
|
|
299
|
-
156: { label: 'philadelphia_snack_de_s_chocolate', category: 'snack' },
|
|
300
|
-
157: { label: 'pinto_beans', category: 'packaged' },
|
|
301
|
-
158: { label: 'plantain_single', category: 'produce' },
|
|
302
|
-
159: { label: 'polaner_with_fiber_seedless_blackberry_preserves_g', category: 'packaged' },
|
|
303
|
-
160: { label: 'pomegranate', category: 'produce' },
|
|
304
|
-
161: { label: 'pork_belly', category: 'meat' },
|
|
305
|
-
162: { label: 'pork_chops', category: 'meat' },
|
|
306
|
-
163: { label: 'pork_loin', category: 'meat' },
|
|
307
|
-
164: { label: 'pork_shoulder', category: 'meat' },
|
|
308
|
-
165: { label: 'pork_tenderloin', category: 'meat' },
|
|
309
|
-
166: { label: 'portobello_mushrooms', category: 'produce' },
|
|
310
|
-
167: { label: 'potato', category: 'produce' },
|
|
311
|
-
168: { label: 'powdered_sugar', category: 'packaged' },
|
|
312
|
-
169: { label: 'pre_d_pepitas', category: 'snack' },
|
|
313
|
-
170: { label: 'pretzels', category: 'snack' },
|
|
314
|
-
171: { label: 'protein_bar', category: 'snack' },
|
|
315
|
-
172: { label: 'provolone_cheese', category: 'dairy' },
|
|
316
|
-
173: { label: 'pumpkin_pie_spice_shaker', category: 'spice' },
|
|
317
|
-
174: { label: 'purina_friskies_fish_a_licious_wet_cat_in_gravy_va', category: 'unknown' },
|
|
318
|
-
175: { label: 'quick_p_rled_barley', category: 'packaged' },
|
|
319
|
-
176: { label: 'raspberries', category: 'produce' },
|
|
320
|
-
177: { label: 'red_cabbage', category: 'produce' },
|
|
321
|
-
178: { label: 'red_onion', category: 'produce' },
|
|
322
|
-
179: { label: 'rice', category: 'packaged' },
|
|
323
|
-
180: { label: 'roma_tomato', category: 'produce' },
|
|
324
|
-
181: { label: 'romaine_lettuce', category: 'produce' },
|
|
325
|
-
182: { label: 'rosemary', category: 'produce' },
|
|
326
|
-
183: { label: 'rosemary_l_ves', category: 'spice' },
|
|
327
|
-
184: { label: 'rotisserie_chicken', category: 'meat' },
|
|
328
|
-
185: { label: 'ry_catfish_fillets', category: 'meat' },
|
|
329
|
-
186: { label: 's_soning', category: 'spice' },
|
|
330
|
-
187: { label: 'sage', category: 'produce' },
|
|
331
|
-
188: { label: 'salsa', category: 'condiment' },
|
|
332
|
-
189: { label: 'salted_butter', category: 'dairy' },
|
|
333
|
-
190: { label: 'shallot', category: 'produce' },
|
|
334
|
-
191: { label: 'shirataki', category: 'packaged' },
|
|
335
|
-
192: { label: 'shortcrust_pastry', category: 'bakery' },
|
|
336
|
-
193: { label: 'shredded_cheese', category: 'dairy' },
|
|
337
|
-
194: { label: 'shrimp', category: 'meat' },
|
|
338
|
-
195: { label: 'sirloin_steak', category: 'meat' },
|
|
339
|
-
196: { label: 'skim_milk', category: 'dairy' },
|
|
340
|
-
197: { label: 'sliced_cheese', category: 'dairy' },
|
|
341
|
-
198: { label: 'smoked_salmon', category: 'meat' },
|
|
342
|
-
199: { label: 'soy_milk', category: 'dairy' },
|
|
343
|
-
200: { label: 'spaghetti', category: 'packaged' },
|
|
344
|
-
201: { label: 'spaghetti_squash', category: 'produce' },
|
|
345
|
-
202: { label: 'sparkling_water', category: 'beverage' },
|
|
346
|
-
203: { label: 'spice_islands_pumpkin_pie_spice_kosher', category: 'spice' },
|
|
347
|
-
204: { label: 'spinach', category: 'produce' },
|
|
348
|
-
205: { label: 'stock', category: 'packaged' },
|
|
349
|
-
206: { label: 'sugar', category: 'packaged' },
|
|
350
|
-
207: { label: 'tilapia', category: 'meat' },
|
|
351
|
-
208: { label: 'tilapia_fillet', category: 'meat' },
|
|
352
|
-
209: { label: 'tomatillo', category: 'produce' },
|
|
353
|
-
210: { label: 'tomato', category: 'produce' },
|
|
354
|
-
211: { label: 'tomato_paste', category: 'packaged' },
|
|
355
|
-
212: { label: 'tomato_sauce', category: 'packaged' },
|
|
356
|
-
213: { label: 'tortilla_chips', category: 'snack' },
|
|
357
|
-
214: { label: 'trail_mix', category: 'snack' },
|
|
358
|
-
215: { label: 'twinings_londin_immue_support_blackberry_flavored', category: 'beverage' },
|
|
359
|
-
216: { label: 'unsalted_butter', category: 'dairy' },
|
|
360
|
-
217: { label: 'unsweetened_chocolate_baking_squares', category: 'packaged' },
|
|
361
|
-
218: { label: 'unsweetened_coconut_flakes', category: 'packaged' },
|
|
362
|
-
219: { label: 'vanilla', category: 'packaged' },
|
|
363
|
-
220: { label: 'vegan_cr_m', category: 'dairy' },
|
|
364
|
-
221: { label: 'vegan_marshmallows', category: 'snack' },
|
|
365
|
-
222: { label: 'vegetable_oil', category: 'packaged' },
|
|
366
|
-
223: { label: 'walnuts', category: 'snack' },
|
|
367
|
-
224: { label: 'white_bread', category: 'bakery' },
|
|
368
|
-
225: { label: 'white_onion', category: 'produce' },
|
|
369
|
-
226: { label: 'whole_milk', category: 'dairy' },
|
|
370
|
-
227: { label: 'xanthan_gum', category: 'packaged' },
|
|
371
|
-
228: { label: 'yellow_onion', category: 'produce' },
|
|
372
|
-
229: { label: 'yellow_squash', category: 'produce' },
|
|
373
|
-
230: { label: 'yogurt', category: 'dairy' },
|
|
374
|
-
231: { label: 'yukon_gold_potato', category: 'produce' },
|
|
375
|
-
232: { label: 'zucchini', category: 'produce' },
|
|
376
|
-
};
|
|
377
|
-
/**
|
|
378
|
-
* Number of classes in the model
|
|
379
|
-
*/
|
|
380
|
-
exports.NUM_CLASSES = 233;
|
|
381
|
-
/**
|
|
382
|
-
* Get label info for a class index
|
|
383
|
-
*/
|
|
384
|
-
function getClassInfo(classIndex) {
|
|
385
|
-
const info = exports.CLASS_LABELS[classIndex];
|
|
386
|
-
if (info) {
|
|
387
|
-
return info;
|
|
388
|
-
}
|
|
389
|
-
// Fallback for unknown indices
|
|
390
|
-
return { label: `class_${classIndex}`, category: 'unknown' };
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* Get all labels as an array (ordered by class index)
|
|
394
|
-
*/
|
|
395
|
-
function getLabelsArray() {
|
|
396
|
-
const labels = [];
|
|
397
|
-
for (let i = 0; i < exports.NUM_CLASSES; i++) {
|
|
398
|
-
labels.push(exports.CLASS_LABELS[i]?.label ?? `class_${i}`);
|
|
399
|
-
}
|
|
400
|
-
return labels;
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* Category to class indices mapping
|
|
404
|
-
*/
|
|
405
|
-
exports.CATEGORY_CLASSES = {
|
|
406
|
-
produce: Object.entries(exports.CLASS_LABELS)
|
|
407
|
-
.filter(([, v]) => v.category === 'produce')
|
|
408
|
-
.map(([k]) => parseInt(k, 10)),
|
|
409
|
-
meat: Object.entries(exports.CLASS_LABELS)
|
|
410
|
-
.filter(([, v]) => v.category === 'meat')
|
|
411
|
-
.map(([k]) => parseInt(k, 10)),
|
|
412
|
-
dairy: Object.entries(exports.CLASS_LABELS)
|
|
413
|
-
.filter(([, v]) => v.category === 'dairy')
|
|
414
|
-
.map(([k]) => parseInt(k, 10)),
|
|
415
|
-
packaged: Object.entries(exports.CLASS_LABELS)
|
|
416
|
-
.filter(([, v]) => v.category === 'packaged')
|
|
417
|
-
.map(([k]) => parseInt(k, 10)),
|
|
418
|
-
bakery: Object.entries(exports.CLASS_LABELS)
|
|
419
|
-
.filter(([, v]) => v.category === 'bakery')
|
|
420
|
-
.map(([k]) => parseInt(k, 10)),
|
|
421
|
-
snack: Object.entries(exports.CLASS_LABELS)
|
|
422
|
-
.filter(([, v]) => v.category === 'snack')
|
|
423
|
-
.map(([k]) => parseInt(k, 10)),
|
|
424
|
-
beverage: Object.entries(exports.CLASS_LABELS)
|
|
425
|
-
.filter(([, v]) => v.category === 'beverage')
|
|
426
|
-
.map(([k]) => parseInt(k, 10)),
|
|
427
|
-
condiment: Object.entries(exports.CLASS_LABELS)
|
|
428
|
-
.filter(([, v]) => v.category === 'condiment')
|
|
429
|
-
.map(([k]) => parseInt(k, 10)),
|
|
430
|
-
spice: Object.entries(exports.CLASS_LABELS)
|
|
431
|
-
.filter(([, v]) => v.category === 'spice')
|
|
432
|
-
.map(([k]) => parseInt(k, 10)),
|
|
433
|
-
frozen: Object.entries(exports.CLASS_LABELS)
|
|
434
|
-
.filter(([, v]) => v.category === 'frozen')
|
|
435
|
-
.map(([k]) => parseInt(k, 10)),
|
|
436
|
-
unknown: Object.entries(exports.CLASS_LABELS)
|
|
437
|
-
.filter(([, v]) => v.category === 'unknown')
|
|
438
|
-
.map(([k]) => parseInt(k, 10)),
|
|
439
|
-
};
|
package/dist/index.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @souschef/ml-vision
|
|
3
|
-
*
|
|
4
|
-
* ML-powered product detection for React Native
|
|
5
|
-
*
|
|
6
|
-
* Features:
|
|
7
|
-
* - Multi-barcode scanning (scan multiple barcodes at once)
|
|
8
|
-
* - Receipt OCR (photograph receipts to extract items)
|
|
9
|
-
* - Visual product recognition (recognize fridge/pantry contents)
|
|
10
|
-
* - Video scanning (real-time product detection)
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import {
|
|
15
|
-
* MLVisionProvider,
|
|
16
|
-
* useMultiBarcodeScanner,
|
|
17
|
-
* useProductDetector,
|
|
18
|
-
* useReceiptScanner,
|
|
19
|
-
* } from '@souschef/ml-vision';
|
|
20
|
-
*
|
|
21
|
-
* // Wrap your app with the provider
|
|
22
|
-
* function App() {
|
|
23
|
-
* return (
|
|
24
|
-
* <MLVisionProvider
|
|
25
|
-
* config={{ serverUrl: 'http://192.168.1.100:8000' }}
|
|
26
|
-
* storage={mmkvInstance}
|
|
27
|
-
* >
|
|
28
|
-
* <YourApp />
|
|
29
|
-
* </MLVisionProvider>
|
|
30
|
-
* );
|
|
31
|
-
* }
|
|
32
|
-
*
|
|
33
|
-
* // Use hooks in your components
|
|
34
|
-
* function ScannerScreen() {
|
|
35
|
-
* const { scanPhoto, results } = useMultiBarcodeScanner();
|
|
36
|
-
* const { detectProducts, detections } = useProductDetector();
|
|
37
|
-
*
|
|
38
|
-
* // ...
|
|
39
|
-
* }
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* @packageDocumentation
|
|
43
|
-
*/
|
|
44
|
-
export type { MLVisionConfig, BoundingBox, BaseDetectionResult, ModelInfo, ModelDownloadProgress, CacheEntry, CacheStats, ServerHealthResponse, ServerErrorResponse, BarcodeFormat, BarcodeData, BarcodeDetectionResult, UseMultiBarcodeScannerOptions, UseMultiBarcodeScannerReturn, BarcodeCacheEntry, ProductCategory, ProduceType, ProduceQuality, ProductData, ProductMatch, ProduceData, ProductDetectionResult, DetectionModel, UseProductDetectorOptions, UseProductDetectorReturn, TFLiteDetectionOutput, ClassLabelMap, TextLine, TextBlock, TextRecognitionResult, ReceiptItem, ReceiptMetadata, ReceiptScanResult, KnownStore, UseReceiptScannerOptions, UseReceiptScannerReturn, ReceiptLineType, ParsedReceiptLine, } from './types';
|
|
45
|
-
export { GROCERY_BARCODE_FORMATS } from './types/barcode';
|
|
46
|
-
export { MLVisionProvider, useMLVisionContext, useMLVisionReady, type MLVisionProviderProps, type MLVisionContextValue, CacheManager, createCacheManager, CACHE_TTL, type CachedBarcodeLookup, type CachedProductRecognition, ServerClient, createServerClient, ServerError, type ServerRequestOptions, type ImageUploadData, type DetectionRequestOptions, type OCRRequestOptions, } from './core';
|
|
47
|
-
export { useProductDetector } from './hooks/useProductDetector';
|
|
48
|
-
export { CLASS_LABELS, NUM_CLASSES, getClassInfo, getLabelsArray, CATEGORY_CLASSES, } from './hooks/classLabels';
|
|
49
|
-
export { useMultiBarcodeScanner } from './hooks/useMultiBarcodeScanner';
|
|
50
|
-
export { useReceiptScanner } from './hooks/useReceiptScanner';
|
|
51
|
-
export { useVideoScanner, type ScanMode, type VideoScanResult, type UseVideoScannerOptions, type UseVideoScannerReturn, } from './hooks/useVideoScanner';
|
|
52
|
-
export { DetectionOverlay, DetectionLoadingOverlay, type DetectionOverlayProps, } from './components';
|
|
53
|
-
export { createDetectionProcessor, frameDetectionToResult, getClassLabel, type FrameDetection, type DetectionProcessorOptions, } from './processors';
|
|
54
|
-
export { useTFLiteFrameProcessor, createTFLiteFrameProcessor, type TFLiteFrameDetection, type FrameProcessorResult, type UseTFLiteFrameProcessorOptions, } from './processors';
|
|
55
|
-
export { preprocessImage, isSkiaAvailable, isResizePluginAvailable, getFrameProcessorInstructions, } from './utils/imagePreprocessor';
|
|
56
|
-
export { processYoloOutput, scaleDetections, } from './utils/yoloProcessor';
|
|
57
|
-
export { COCO_CLASSES, CLASS_LABELS_COCO, NUM_CLASSES_COCO, FOOD_CLASS_INDICES, getCocoClassInfo, isFoodClass, } from './hooks/classLabelsCoco';
|
|
58
|
-
export declare const VERSION = "0.1.0";
|