= TempNet.from_bandwidth(5,2) tnet
temporal network
utilities holding temporal network info
TempNet
TempNet (image_pairs, check_if_valid=True)
Initialize self. See help(type(self)) for accurate signature.
Usage:
Create a temporal network by specifing the number of images and the temporal bandwidth (the maximum number of images to be paired with one image):
tnet.image_pairs
array([[0, 1],
[0, 2],
[1, 2],
[1, 3],
[2, 3],
[2, 4],
[3, 4]], dtype=int32)
Or, you can specify your own image pairs:
= TempNet(np.stack(([0,1,2,3],[1,2,3,4]),axis=-1))
tnet tnet.image_pairs
array([[0, 1],
[1, 2],
[2, 3],
[3, 4]], dtype=int32)
=1,sec=2) tnet.image_pairs_idx(ref
1
=[1,2],sec=[2,3]) tnet.image_pairs_idx(ref
array([1, 2])
nimage_from_npair
nimage_from_npair (npair)
infer number of images from number of pairs assuming all pairs are selected.
6) nimage_from_npair(
4