tf-siammask
SiamMask implementation with Tensorflow 2.
Install
pip install tf-siammask
Example
import numpy as np
import PIL.Image
import siammask
sm = siammask.SiamMask()
# Weight files are automatically retrieved from GitHub Releases
sm.load_weights()
# Adjust this parameter for the better mask prediction
sm.box_offset_ratio = 1.5
img_prev = np.array(PIL.Image.open('data/cat1.jpg'))[..., ::-1]
box_prev = np.array([[227, 184], [381, 274]])
img_next = np.array(PIL.Image.open('data/cat2.jpg'))[..., ::-1]
# Predicted box and mask images is created if `debug=True`
box, mask = sm.predict(img_prev, box_prev, img_next, debug=True)
Test data
| Previous frame | Next frame | |
|---|---|---|
| File name | ./data/cat1_with_box.jpg |
./data/cat2.jpg |
| Image |
Predicted mask for ./data/cat2.jpg
TODO
- Bounding-box regression
- Mask refinement network
- Pre-trained model for Tensorflow 2.0
- Training code
- Object tracking code
Reference
@inproceedings{wang2019fast,
title={Fast online object tracking and segmentation: A unifying approach},
author={Wang, Qiang and Zhang, Li and Bertinetto, Luca and Hu, Weiming and Torr, Philip HS},
booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
year={2019}
}
Metadata
Release files for tf-siammask 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tf-siammask-1.0.4.tar.gz | 8.8 kB | Without provenance | Details for tf-siammask-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tf_siammask-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for tf_siammask-1.0.4-py3-none-any.whl |
Total release size: 24.6 kB
Release files / tf-siammask-1.0.4.tar.gz
| Download URL | tf-siammask-1.0.4.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8518c4497c963a87c0c22c7e6b570104f2e325905d5d40d658adc22039b5f38d
|
|
BLAKE2b-256 checksum How to use checksums |
7af89bc12ac76dbdda12fd09525106de20f666064eea2971e8fd22518a864c68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
|
Release files / tf_siammask-1.0.4-py3-none-any.whl
| Download URL | tf_siammask-1.0.4-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c84967517bab38a5a53d2f02ac8a24fb8e442e69295dc305eac1ebc0fb48710f
|
|
BLAKE2b-256 checksum How to use checksums |
be838356fd7c68a5a939b3e59ebe83b893ed90c23f5ae757e4957774161c6c6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
|
Security for tf-siammask 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.