Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@microsoft/customvision-tfjs
Advanced tools
Library for Tensorflow.js models exported from customvision.ai
NPM package for TensorFlow.js models exported from Custom Vision Service
This package is for web browsers. If you are looking for a library to run on Node.js environment, please use customvision-tfjs-node.
npm install @microsoft/customvision-tfjs
Or, if you would like to use CDN,
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.8.3/dist/tf.min.js"></script>
<script src="https://unpkg.com/@microsoft/customvision-tfjs@1.2.0"></script>
<img id="image" src="test_image.jpg" />
import * as cvstfjs from '@microsoft/customvision-tfjs';
let model = new cvstfjs.ClassificationModel();
await model.loadModelAsync('model.json');
const image = document.getElementById('image');
const result = await model.executeAsync(image);
The result is a 1D-array of probabilities.
import * as cvstfjs from '@microsoft/customvision-tfjs';
let model = new cvstfjs.ObjectDetectionModel();
await model.loadModelAsync('model.json');
const image = document.getElementById('image');
const result = await model.executeAsync(image);
The result has 3 arrays.
[
[[0.1, 0.3, 0.4, 0.3], [0.2, 0.4, 0.8, 0.9]], // bounding boxes (x1, y1, x2, y2)
[0.2, 0.3], // probabilities
[1, 4] // class ids
]
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
FAQs
Library for Tensorflow.js models exported from customvision.ai
The npm package @microsoft/customvision-tfjs receives a total of 196 weekly downloads. As such, @microsoft/customvision-tfjs popularity was classified as not popular.
We found that @microsoft/customvision-tfjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.