
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
@tensorflow-models/depth-estimation
Advanced tools
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 16 weekly downloads. As such, @tensorflow-models/depth-estimation popularity was classified as not popular.
We found that @tensorflow-models/depth-estimation demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.