Граф коммитов

63 Коммитов

Автор SHA1 Сообщение Дата
Wenbing Li c9c11b4846
Fix the windows API missing issue and Linux shared library size issue for Java packaging. (#774)
* Fix the java packaging issues

* add the jar path example for Linux build with a default configuration
2024-07-29 16:03:58 -07:00
Wenbing Li c58c930739
Ignore all streaming output of invalid utf-8 string (#704)
* Ignore all streaming output of invalid utf-8 string

* Update bpe_streaming.hpp

* add the phi-3 tokenizer test

* add a streaming test for phi-3 model

* fix the utf-8 validation

* fix the utf-8 validation 2

* fix the utf-8 validation 3

* fix the utf-8 validation 4
2024-05-06 16:46:55 -07:00
Wenbing Li 8645a846fb
A tutorial of build ort-extensions from source as a static library (#703)
* The tutorial of build from source as a static library

* update test flag control

* add the tutorial
2024-05-01 13:46:27 -07:00
Rachel Guo fe8cd9ee8d
Add extensions catalyst support (#684)
* save work

* add flags to disable build that's currently not supported on macabi

* update

* update

* fix arg type

* update ext_test.cmake

* fix

* try add flags

* exclude ext_test

* add missing downloading steps

* nameing minor fix

* update ios version etc.

* fix

* minor fix

* minor fix

* clean up

* nuget package changes for catalyst extensions (#686)

Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>

* update to net7.0 and add help comments

---------

Co-authored-by: rachguo <rachguo@rachguos-Mac-mini.local>
Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
2024-04-17 10:43:35 -07:00
Nat Kershaw (MSFT) 5c53aaad62
Update Yolov8 tutorial with arguments (#658) 2024-02-21 20:11:45 -08:00
Scott McKay da9c01d3e1
Add support for YOLO v8 Pose post-processing. (#605)
* Add support for YOLO v8 Pose post-processing.

The output has additional values in the 'mask' data for the keypoints.

- Update the post processing steps to support extracting and scaling the keypoints.
- Simplify the existing step to split out the boxes and scores by using a basic Split operator if there is no confidence score for a bounding box to apply to the class scores.
  - Confidence score for a bounding box is YOLO versions prior to 8.
- Update existing tests

TODO: Add unit tests for new Steps. They have been manually validated with the real model for now.

* Changes to support pre-decoded input.

Needs cleanup.

* Support an overall max number of detections as well as per-class detections.

* Expand Identity to support multiple inputs
Fix issue with incorrect score being selected by NMS (was max and not score for selected clas)
Fix TopK usage so result ordering is consistent when it is not used
Add unit tests.

* Update docs and some cleanups

* Use Union
2023-12-20 08:51:29 +10:00
Hiroshi Yoshioka c46ce8f64a
Typo "Pytorch"→"PyTorch" (#569)
https://github.com/microsoft/onnxruntime-extensions/blob/main/tutorials/pytorch_custom_ops_tutorial.ipynb
#PingMSFTDocs
2023-10-06 10:06:08 -07:00
Vishal Jain 0fb2629091
Fix test data path in yolo_e2e (#534)
Co-authored-by: Vishal Jain <vkjain@xilinx.com>
Co-authored-by: JiCheng <247153481@qq.com>
Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>
2023-08-30 10:22:25 -07:00
kunal-vaishnavi 29c6d66c02
Separate variable definition in Whisper E2E script (#535)
This PR fixes running this script by defining the number of mels and number of frames on separate lines.
2023-08-18 11:17:43 -07:00
kunal-vaishnavi c8bb9e8abd
Update inputs in Whisper E2E script (#511)
This PR updates the inputs for the inference pass to show the required and optional ones.
2023-08-08 15:46:21 -07:00
Wenbing Li 62d8598b6b
Update whisper model test cases and e2e example (#496)
* Update whisper model test cases and e2e example

* fix unit test on windows

* more refinement

* utest fix
2023-07-21 15:27:02 -07:00
Wenbing Li 43994eb34a
Fix the unit test failure with ONNX 1.14 package. (#428)
* Fix the unit test failure with ONNX 1.14 package.

* more tests

* Update whisper_e2e.py
2023-05-08 11:37:54 -07:00
Wenbing Li 2fa0b710ea
Adding down-sampling and stereo mixing features for AudioDecoder (#420)
* initial draft

* second

* third

* polishing

* fix the M_PI name in LINUX platform

* fix bessel function issue

* add a unit test case

* fix the unit test name
2023-05-04 13:30:10 -07:00
kunal-vaishnavi f12270b068
Make Whisper E2E script more portable (#412)
This PR makes the Whisper E2E script more portable for other environments.
2023-04-28 10:17:56 -07:00
Wenbing Li 0e2d6c03e4
Add an C# demo project for NuGet package (#407)
* Add a nuget test app

* remove unused file

* Compatible with onnxruntime-gpu package (#410)

* be compatible without onnxruntime-gpu version

* some fixing

* turn it as a .net demo project

---------

Co-authored-by: Sayan Shaw <52221015+sayanshaw24@users.noreply.github.com>
2023-04-27 14:29:58 -07:00
Wenbing Li 0f45fef2d9
Compatible with onnxruntime-gpu package (#410)
* be compatible without onnxruntime-gpu version

* some fixing
2023-04-26 17:17:23 -07:00
Wenbing Li 997fa892c2
more code fixing related whisper models (#403) 2023-04-21 09:26:44 -07:00
Wenbing Li 26dda4eb74
some fixing for python package (#401) 2023-04-20 15:57:06 -07:00
JiCheng db87dc416d
[object detection ppp] YoLo as example (#397)
* object detection
* Unit test
add e2e fastestdet model test

---------

Co-authored-by: Changming Sun <chasun@microsoft.com>
Co-authored-by: Scott McKay <skottmckay@gmail.com>
2023-04-20 13:34:11 +08:00
Wenbing Li adb8efd62b
support batch > 1 in BpeDecoder (#400)
* support batch > 1 in BpeDecoder

* update the shape in helper function
2023-04-19 14:28:56 -07:00
Wenbing Li 711774db6b
Add a merge step in whisper end-to-end script and fixed some issues (#399)
* add merged models in whisper model

* verify the final model
2023-04-17 16:37:06 -07:00
Wenbing Li 2202e3e19b
make tensorflow be optional for unittest (#394)
* make tensorflow be optional for unitest.

* typo
2023-04-11 19:52:55 -07:00
Wenbing Li b5dce955f0
Add an audio decoder custom op for whisper end-to-end processing (#385)
* evaluate the audio decoder library

* MP3 Decoder

* rename it to test_audio_codec

* add the audio decoder to whisper model

* whisper end-to-end draft

* fix the mp3 decoder

* Running with ONNX models

* Add more audio format supports

* refine the end-to-end script

* Update operators/audio/audio_decoder.hpp

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>

* Update operators/audio/audio_decoder.hpp

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>

* Update operators/audio/audio_decoder.hpp

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>

* some fixings of comments and more test cases.

* changes for review comments.

* Update audio_decoder.hpp

* Update audio_decoder.hpp

* code refinement

* Update operators/audio/audio_decoder.hpp

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>

---------

Co-authored-by: Sayan Shaw <52221015+sayanshaw24@users.noreply.github.com>
Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
2023-04-11 14:47:10 -07:00
Wenbing Li 9cd1284da8
Pre and Post processing example for openAI Whisper model (#380)
* add a stft-norm custom op for log-mel spectrum.

* undo the debug change

* Support ONNX standard STFT op signature.

* Add a unit test onnx STFT compatible mode.

* add whisper pre-/post- processing example

* Update dlib.cmake

* undo test code changes

* Update setup.cfg

* update the end2end example with STFT op
2023-03-30 13:44:50 -07:00
JiCheng b375cb57e6
support mobilebert_ppp (#354)
* support mobilebert_ppp

* renaming IOEntryValuePreserver

* generalize argmax step
---------

Co-authored-by: Scott McKay <Scott.McKay@microsoft.com>
2023-02-27 18:53:37 +08:00
Scott McKay 91d75f460b
Update tutorial and example usage to provide info on installing the nightly (#364) 2023-02-17 19:27:00 -08:00
Scott McKay f3654e5bac
Fix opset 18 issues and bug due to ORT Resize issue (#362)
* - Fix Split(18) requiring num_outputs.
- Calculate `sizes` in Resize instead of using the simpler `scales`
  - ORT implementation does not round correctly when applying scales
- Update center crop to use float so we are more accurate in choosing the crop area.
- Fix minor issue with Debug step by only adding values that are altered to the renaming graph inputs.
- Update unit tests expected output due to the change in Resize using sizes instead of scales.
- Crop e2e example input so before/after image covers same area.

* Simplify.
CenteredCrop doesn't need to use float as it's dividing by 2 (so using float + floor gives the same result).
Remove Resize impl using scales - we most likely will never go back to it.
Address PR comments
Update doc
2023-02-18 06:37:05 +10:00
Scott McKay cd5ea11aaa
Move the pre/post processing scripts into the python module. (#349)
* Move the pre/post processing scripts into the python module.
Update usage/examples.

* Use better version parsing.

* Update tests, docs,

* Address PR comments.
Remove global Settings and pass onnx opset around directly where needed. Make PrePostProcessor the owner of the checker context.
2023-01-26 08:30:21 +10:00
Scott McKay 5d53f91f11
Minor opencv tweaks (#316)
* Separate ops in operators/cv2 that do and do not require codecs so they're easier to include/exclude from a build.
Remove jpeg2000 from opencv file formats. It costs 1MB and is (afaict) not a common format.
Add ability to enable/disable cv2 ops to gen_selectedops.py.

* Remove super resolution pre/post process ops that are no longer needed.

* Replace super resolution e2e tutorial

Co-authored-by: Wenbing Li <10278425+wenbingl@users.noreply.github.com>
2022-12-20 13:47:17 +10:00
Edward Chen 280ec289cb
Use `object` instead of `np.object` and `str` instead of `np.str`. (#337) 2022-12-19 18:45:07 -05:00
Wenbing Li 0647ce6d14
update the main doc and add a developer doc (#321)
* update the main doc and add a developer doc

* add it back

* fix some typo

* Update README.md

Co-authored-by: Nat Kershaw (MSFT) <nakersha@microsoft.com>

Co-authored-by: Nat Kershaw (MSFT) <nakersha@microsoft.com>
2022-12-02 16:27:58 -08:00
Wenbing Li 187411d5c9
Add an android test app for extensions AAR package in CI pipeline (#308)
* an android test app for extensions AAR package

* add the pipeline

* fxing the Android CI pipeline

* fix the build issus on macOS

* more fixings

* more fixings

* switch to jdk 11

* gradlew path issue

* update the command lines

* split the test task

* better name
2022-11-08 10:19:12 -08:00
Wenbing Li 08659eae90
Initial Java API for the JAR package. (#292)
* more C++ code fixing and polish for release

* fixing for android build

* build flags for android release

* add missing exporting function

* imint

* first versoin

* more C++ code fixing and polish for release (#275)

* more C++ code fixing and polish for release

* fixing for android build

* build flags for android release

* add missing exporting function

* support build_id on Python package building (#281)

* support buildid in package building

* undo the change on build.sh

* build.sh issue on macos

* Add `$schema` to `cgmanifest.json` (#284)

Co-authored-by: Jamie Magee <jamie.magee@microsoft.com>

* test package with a simple java app

* demo app

* some fixing for windows platform

* refine the example app

* fix the missing symobls issue for Linux build

* fix the package package build issue

* typo

* a missing change

* fix PythonOp

* fix Android test issue

* one more Android change

* replace build flags in ci pipeline

* android AAR package build

* refine the code for android package

Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
Co-authored-by: Jamie Magee <jamie.magee@microsoft.com>
2022-10-04 16:22:28 -07:00
shaahji 78d8dd5705 OpenCV Image Decoder & SuperResolution CustomOps 2022-09-30 12:08:38 -07:00
shaahji 0616039115 Issue #226: Functional e2e NLP example
* Implemented a new version of Kernel and the CustomOp to support
  output that matches the HuggingFace model's input without the need
  for intermediate python logic.
* Implemented a e2e tutorial for exporting and inferencing using the
  HuggingFace's QuestionAnsering model.

Known Issue: Python side doesn't have an implementation of Bert Decoder
and so the augmented model is only half-complete. At the time of
inferencing the HuggingFace tokenizer is used to decode the result back
to string.
2022-07-22 13:56:40 -07:00
Nat Kershaw (MSFT) f12f42a007
Update README.md (#238) 2022-07-06 16:18:35 -07:00
Wenbing Li da4784a2cc
update the bert end to end example with hftok (#236) 2022-06-01 10:41:42 -07:00
Wenbing Li bfbfa5a304
An end-to-end BERT model with pre-/post- processing. (#224)
* bert demo

* add some comments

* support multiple outputs in ONNX model

* code polishing

* encoding issue on Windows platform.
2022-04-20 16:14:46 -07:00
Wenbing Li 98fb96d4e8
updat the tutorial (#214) 2022-03-23 14:28:18 -07:00
Wenbing Li 4bb3a22c45
The new pre/post processing API, replacing ONNXCompose (#205)
* traced processing module

* before debugging.

* updates

* temporary

* the trace mode pass

* code adjusting for ci pipeline.

* only torch 1.11 support prim:pythonop

* extending sequence processing module.
2022-03-08 16:32:59 -08:00
Wenbing Li 5bf46560a6
Update gpt2bs.py 2022-02-10 11:07:18 -08:00
Wenbing Li 8eb89cdd8b
clean up the unused files (#199)
* clean up the unused files

* one more files

* update the doc as well
2022-02-09 15:18:13 -08:00
Wenbing Li 459c4f7d61
Update pytorch_custom_ops_tutorial.ipynb (#196)
* Update pytorch_custom_ops_tutorial.ipynb

* Update mshost.yaml

* tidy up
2022-02-02 10:34:20 -08:00
Wenbing Li d079ba4bed
Update mshost.yaml for Azure Pipelines (#184)
* Update mshost.yaml for Azure Pipelines

* Update mshost.yaml for Azure Pipelines

* hotfix for ort beam search step
2021-11-29 13:22:23 -08:00
Wenbing Li 0b2cfe7dd7
update the docs for imagenet pnp (#186) 2021-11-29 10:53:15 -08:00
Wenbing Li 9bd453e0f1
initial checkins for onnxcompose (#185)
* initial checkins for onnxcompose

* update ci pipeline for the test.

* add the missing quotes

* Switch to looseVersion for torch version.

* testif

* padding_length

* skip the gpt2

* add onnxruntime 1.9 test package.

* fix a memory bug on pyop.
2021-11-22 21:02:39 -08:00
Wenbing Li 6ad95f6df1
upgrade ort and ir version mapping (#157)
* some bugs fixing for the gpt2 tools

* upgrade ort and ir version mapping
2021-09-27 14:56:22 -07:00
Wenbing Li 6c3b496e3f
Support the domain name in the PyOp. (#136) 2021-08-26 11:04:45 -07:00
Wenbing Li a428be447c
optimize the gpt2-bs model after the generation (#119) 2021-07-08 15:36:11 -07:00
Wenbing Li 7fd96c8e97
fix the input shape in the gptbs model. (#118) 2021-07-02 18:00:09 -07:00