Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@tensorflow-models/depth-estimation
Advanced tools
Readme
This package provides models for running depth estimation in TensorFlow.js.
Currently, we provide 1 model option:
This AR portrait depth model estimates per-pixel depth (the distance to the camera center) for a single portrait image, which can be further used for creative applications. (See DepthLab for potential applications).
For example, the following demo transforms a single 2D RGB image into a 3D Portrait: 3D Photo Demo
There are two steps to run the AR portrait depth API:
First, you create an estimator by choosing one of the models from
SupportedModels
.
For example:
const model = depthEstimation.SupportedModels.ARPortraitDepth;
const estimator = await depthEstimation.createEstimator(model);
Next, you can use the estimator to estimate depth.
const estimationConfig = {
minDepth: 0,
maxDepth: 1,
}
const depthMap = await estimator.estimateDepth(image, estimationConfig);
The returned depth map contains depth values for each pixel in the image.
Example output:
{
toCanvasImageSource(): ...
toArray(): ...
toTensor(): ...
getUnderlyingType(): ...
}
The output provides access to the underlying depth values using the conversion functions toCanvasImageSource, toArray, and toTensor depending on the desired output type. Note that getUnderlyingType can be queried to determine what is the type being used underneath the hood to avoid expensive conversions (such as from tensor to image data).
Refer to each model's documentation for specific configurations for the model and their performance.
You may reference the demos for code examples.
Details for how to run the demos are included in the demos/
folder.
FAQs
Pretrained depth model
The npm package @tensorflow-models/depth-estimation receives a total of 3 weekly downloads. As such, @tensorflow-models/depth-estimation popularity was classified as not popular.
We found that @tensorflow-models/depth-estimation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.