Commit Graph

143 Commits

Author SHA1 Message Date
MediaPipe Team
a1e1b5d34c Internal change.
PiperOrigin-RevId: 573318330
2023-10-13 14:25:27 -07:00
MediaPipe Team
573fdad173 Add export_model_with_tokenizer to Text Classifier API.
PiperOrigin-RevId: 567744604
2023-09-22 16:32:38 -07:00
MediaPipe Team
94cda40a83 No public description
PiperOrigin-RevId: 566435327
2023-09-18 15:50:10 -07:00
MediaPipe Team
f4477f1739 A minor typo fix in model maker image classifier hyperparameters python docstring.
PiperOrigin-RevId: 566355937
2023-09-18 11:07:58 -07:00
MediaPipe Team
5f4a6e313e Format improvement.
PiperOrigin-RevId: 563321343
2023-09-06 23:02:05 -07:00
MediaPipe Team
cac462c486 Add allow_custom_ops to model_util.convert_to_tflite and enable custom ops for face stylizer.
PiperOrigin-RevId: 562212965
2023-09-02 09:56:40 -07:00
MediaPipe Team
612162d765 Check if the image contains valid face that can be aligned for stylization. If not, throw an exception for invalid input image. This is applied to both input stylized face and raw face.
PiperOrigin-RevId: 561439600
2023-08-30 13:54:11 -07:00
MediaPipe Team
7f8150776a Add an API to run inference with face stylizer TF model.
PiperOrigin-RevId: 558926645
2023-08-21 16:08:58 -07:00
MediaPipe Team
bbf168ddda Add a new from_image API to create face stylizer dataset from a single image. Also deprecate the from_folder API since we only support one-shot use case now.
PiperOrigin-RevId: 558912896
2023-08-21 15:14:36 -07:00
MediaPipe Team
b213256cbd Change supported_ops to a Tuple instead of List to match the API definition.
PiperOrigin-RevId: 557890361
2023-08-17 11:48:56 -07:00
MediaPipe Team
13bb65db96 Internal Changes
PiperOrigin-RevId: 557563669
2023-08-16 12:16:16 -07:00
MediaPipe Team
9e45e2b6e9 Setting training for the encoder and decoder when converting to TFLite.
Also add selected TF ops to TFLite converter.

PiperOrigin-RevId: 557520277
2023-08-16 10:02:29 -07:00
MediaPipe Team
ff3f0433d3 Fix image_util shortcut import line
PiperOrigin-RevId: 557311617
2023-08-15 18:19:13 -07:00
MediaPipe Team
1c98270ef0 Import image_util for using it in mediapipe face stylizer open sourcing.
PiperOrigin-RevId: 557254489
2023-08-15 14:41:57 -07:00
MediaPipe Team
c8ad606e7c Refactor text_classifier preprocessor to move away from using classifier_data_lib
PiperOrigin-RevId: 556859900
2023-08-14 11:41:09 -07:00
Yuqi Li
c448d54aa7 add metadata writer into face stylizer.
PiperOrigin-RevId: 555596257
2023-08-10 12:09:27 -07:00
MediaPipe Team
c1c51c2fe7 Internal
PiperOrigin-RevId: 554595324
2023-08-07 14:36:42 -07:00
MediaPipe Team
e10bcd1bfd No public description
PiperOrigin-RevId: 554084475
2023-08-05 08:36:24 -07:00
MediaPipe Team
366a3290cf Change to add the w_avg latent code to style encoding before layer swapping. This is a bug in the previous code. Also set training=True for encoder since this affect the encoding performance.
PiperOrigin-RevId: 553234376
2023-08-02 13:11:22 -07:00
MediaPipe Team
557ed0b1ea Add tensorflow-addons to model_maker requirements.txt
PiperOrigin-RevId: 552610011
2023-07-31 15:36:25 -07:00
MediaPipe Team
8e313b4b0c Fix typo in model maker requirements.txt
PiperOrigin-RevId: 551973577
2023-07-28 16:07:12 -07:00
MediaPipe Team
9edb059d9f No public description
PiperOrigin-RevId: 551868738
2023-07-28 09:09:39 -07:00
MediaPipe Team
db9a72a5df Internal Changes
PiperOrigin-RevId: 551674542
2023-07-27 16:35:35 -07:00
Sebastian Schmidt
4d5c6bd33a Internal
PiperOrigin-RevId: 551625147
2023-07-27 13:33:14 -07:00
MediaPipe Team
bd7888cc0c 1. Move evaluation onto GPU/TPU hardware if available.
2. Move desired_precision and desired_recall from evaluate to hyperparameters so recall@precision metrics will be reported for both training and evaluation. This also fixes a bug where recompiling the model with the previously initialized metric objects would not properly reset the metric states.
3. Remove redundant label_names from create_... class methods in text_classifier. This information is already provided by the datasets.
4. Change loss function to FocalLoss.
5. Re-enable text_classifier unit tests using ExBert
6. Add input names to avoid flaky auto-assigned input names.

PiperOrigin-RevId: 550992146
2023-07-25 14:12:26 -07:00
MediaPipe Team
85c3fed70a Add class weights to core hyperparameters and classifier library.
PiperOrigin-RevId: 550962843
2023-07-25 12:29:46 -07:00
MediaPipe Team
62538a9496 No public description
PiperOrigin-RevId: 550954023
2023-07-25 11:57:08 -07:00
MediaPipe Team
3e93cbc838 Internal change
PiperOrigin-RevId: 547404737
2023-07-12 00:04:40 -07:00
Yilei Yang
917af2ce6b Internal change
PiperOrigin-RevId: 547346939
2023-07-11 17:52:07 -07:00
MediaPipe Team
56bc019819 Model Maker allow core dataset library to handle datasets with unknown sizes.
PiperOrigin-RevId: 547268411
2023-07-11 12:47:37 -07:00
MediaPipe Team
0bb4ee8941 Add MobileNetV2_I320 and MobileNetMultiHWAVG_I384 to support larger input image sizes.
PiperOrigin-RevId: 544393692
2023-06-29 10:24:52 -07:00
MediaPipe Team
1ee55d1f1b Support ExBert training and option to select between AdamW and LAMB optimizers for BertClassifier
PiperOrigin-RevId: 543905014
2023-06-27 18:05:15 -07:00
MediaPipe Team
ba7e0e0e50 Add a face alignment preprocessor to face stylizer.
PiperOrigin-RevId: 542559764
2023-06-22 07:59:52 -07:00
MediaPipe Team
c86d80a031 Internal Changes
PiperOrigin-RevId: 542387813
2023-06-21 16:02:54 -07:00
MediaPipe Team
895c685df6 1. Model maker core classifier change _metric_function field to _metric_functions in order to support having multiple metrics.
2. Add SparsePrecision, SparseRecall, BinarySparsePrecisionAtRecall, and BinarySparseRecallAtPrecision to the shared metrics library.
3. Add SparsePrecision, SparseRecall to text classifier, and have the option to evaluate the model with BinarySparsePrecisionAtRecall and BinarySparseRecallAtPrecision

PiperOrigin-RevId: 542376451
2023-06-21 15:19:29 -07:00
Sebastian Schmidt
ef6aeb8828 Allow passing of HParams to MediaPipe training docker
PiperOrigin-RevId: 542052304
2023-06-20 14:39:38 -07:00
MediaPipe Team
80208079d2 Use GFile for internal file systems.
PiperOrigin-RevId: 541041972
2023-06-16 16:45:56 -07:00
MediaPipe Team
4b0f3cacae Internal change
PiperOrigin-RevId: 538313290
2023-06-06 15:52:55 -07:00
MediaPipe Team
cbf1d97429 Internal change
PiperOrigin-RevId: 537613648
2023-06-03 20:19:16 -07:00
MediaPipe Team
759e9fd56e Reorganize the face stylizer test data.
PiperOrigin-RevId: 536074239
2023-05-28 19:28:14 -07:00
MediaPipe Team
ea314ba455 Fix license typos.
PiperOrigin-RevId: 535309354
2023-05-25 10:53:37 -07:00
MediaPipe Team
bc035d9146 This will fix the multiple typos in the tasks files.
PiperOrigin-RevId: 534679277
2023-05-23 21:49:34 -07:00
MediaPipe Team
64af919107 Internal change
PiperOrigin-RevId: 531007009
2023-05-10 14:38:19 -07:00
MediaPipe Team
dd1779840d Update model_maker requirements.txt for release
PiperOrigin-RevId: 530748415
2023-05-09 16:49:41 -07:00
MediaPipe Team
ecc8dca8ba Internal change
PiperOrigin-RevId: 529752098
2023-05-05 10:28:38 -07:00
MediaPipe Team
61cfe2ca9b Object Detector remove nms operation from exported tflite
PiperOrigin-RevId: 529559380
2023-05-04 17:36:11 -07:00
MediaPipe Team
12b0b6fad1 Internal change
PiperOrigin-RevId: 529495239
2023-05-04 14:51:19 -07:00
MediaPipe Team
b350f72394 Support MultiHW AVG Architecture for object detector
PiperOrigin-RevId: 529221127
2023-05-03 16:12:59 -07:00
MediaPipe Team
ad4ae6559b Add an extra op to rescale face stylizer generation output from [-1, 1] to [0, 1].
This conversion is to support running the model on both GPU and CPU.

PiperOrigin-RevId: 528400297
2023-04-30 23:14:29 -07:00
MediaPipe Team
c450283715 Add a filegroup for referencing model.
PiperOrigin-RevId: 528251316
2023-04-30 01:19:19 -07:00