Python bindings for SecureMR project.
When developing a SecureMR app, it's not very easy to debug pipeline.
You are not allowed to access each operator output directly. pySecureMR happens here
to rescue you from complicated and painful debugging time. We bind most of SecureMR
operators to python so you can call each operator and check input and output.
- Linux (ubuntu22): YES
- Windows (wsl2, ubuntu22): YES
- Mac: NO
pip3 install securemrgit clone https://github.com/Pico-Developer/pySecureMR
cd pySecureMR
pip3 install -e "."Check installation:
python3 -c "import securemr"pytestRefer to test code to learn more about the usage.
| ID | Name | Pybind |
|---|---|---|
| 1 | ARITHMETIC_COMPOSE | ✅ |
| 4 | ELEMENTWISE_MIN | ✅ |
| 5 | ELEMENTWISE_MAX | ✅ |
| 6 | ELEMENTWISE_MULTIPLY | ✅ |
| 7 | CUSTOMIZED_COMPARE | ✅ |
| 8 | ELEMENTWISE_OR | ✅ |
| 9 | ELEMENTWISE_AND | ✅ |
| 10 | ALL | ✅ |
| 11 | ANY | ✅ |
| 12 | NMS | ✅ |
| 13 | SOLVE_P_N_P | ✅ |
| 14 | GET_AFFINE | ✅ |
| 15 | APPLY_AFFINE | ✅ |
| 16 | APPLY_AFFINE_POINT | ✅ |
| 17 | UV_TO_3D_IN_CAM_SPACE | ❌ |
| 18 | ASSIGNMENT | ✅ |
| 19 | RUN_MODEL_INFERENCE | ❌ |
| 21 | NORMALIZE | ✅ |
| 22 | CAMERA_SPACE_TO_WORLD | ❌ |
| 23 | RECTIFIED_VST_ACCESS | ❌ |
| 24 | ARGMAX | ✅ |
| 25 | CONVERT_COLOR | ✅ |
| 26 | SORT_VEC | ✅ |
| 27 | INVERSION | ✅ |
| 28 | MAKE_TRANSFORM_MAT | ✅ |
| 29 | SORT_MAT | ✅ |
| 30 | SWITCH_GLTF_RENDER_STATUS | ❌ |
| 31 | UPDATE_GLTF | ❌ |
| 32 | RENDER_TEXT | ❌ |
| 33 | UPLOAD_TEXTURE_TO_GLTF | ❌ |
Install qnn. Only tested on Ubuntu22.04 & python3.10
python3 -m securemr.install_qnn
Run pytorch-to-qnn test and run on android device.
python3 -m securemr.test_pytorch_to_qnn
Visualize pipeline json
python3 -m securemr.viz.pipeline_viz path-to-pipeline.json
Before coding, please install develop related tools by:
make env
For new features, unittest is required.