Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Lightweight package for managing bounding boxes that works seamlessly with most computing frameworks.
Lightweight package for managing bounding boxes that works seamlessly with most computing frameworks.
CI/CD | |
Meta | |
Package |
This package provides a simple API for managing bounding boxes. It allows you to perform transformation to your Numpy's ndarray
, JAX's Array
, PyTorch Tensor
or Tensorflow Tensor
from one orientation to another.
Install the package from the PyPI registry. You may need to specify the framework that you want to managed. Numpy is enabled by default.
pip install anyboxes
# or
pip install "anyboxes[torch]" # or jax, tensorflow
Install the package from the latest commit of the repository.
pip install git+https://github.com/VDuchauffour/anyboxes
from anyboxes import TorchBoxes
import torch
detections = torch.randint(0, 1000, (10, 4))
boxes = TorchBoxes.from_bottom_left_corner(detections)
boxes = boxes.to_center()
boxes.as_tensor
In a nutshell, using a Boxes
involve 3 stages:
# | Stage | Methods that can be used |
---|---|---|
1 | Instantiate a Boxes object with one of the from classmethods | from_top_left_corner , from_bottom_left_corner , from_two_corners , from_center |
2 | Apply a transformation with a to inplace methods | to_top_left_corner , to_bottom_left_corner , to_two_corners , to_center |
3 | Retrieve the modified data with one of the as properties | as_dict , as_tuple , as_numpy , as_array , as_tf_tensor , as_tensor |
To be more specific, when a Boxes
is instantiated, the following attribute are created:
Attribute | Purpose |
---|---|
corners_coordinates | A tuple of coordinates from top to bottom and from left to right |
center_coordinates | A object that contains center coordinates |
size | A object that contains width and height attributes |
origin | Origin of the coordinates, can be equal to top-left or bottom-left |
Clone the project
git clone https://github.com/VDuchauffour/anyboxes
In order to install all development dependencies, run the following command:
pip install -e ".[all,dev]"
To ensure that you follow the development workflow, please setup the pre-commit hooks:
pre-commit install
FAQs
Lightweight package for managing bounding boxes that works seamlessly with most computing frameworks.
We found that anyboxes demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.