We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dreem.io
It might be useful to have class functions to create dummy data using dreem.io.Frame, dreem.io.Instance, and dreem.io.AssociationMatirx
dreem.io.Frame
dreem.io.Instance
dreem.io.AssociationMatirx
eg
class Instance: @classmethod def dummy(cls, gt_track_id=0, pred_track_id=-1, crop_size=64, feature_dim=128, track_score=-1.0, device="cpu"): return cls(gt_track_id=gt_track_id, pred_track_id=pred_track_id, crop=torch.randn(1, 3, cropsize), bbox=torch.rand(1,1,4) * cropsize, features=torch.randn(1, feature_dim), track_score=track_score, emb={"pos": torch.randn(1,feature_dim), "temp": torch.randn(1, feature_dim)}, device=device ) class Frame @classmethod def dummy(cls, frame_id=0, video_id=0, n_instances=2, img_shape=(3,256,256)) return cls(frame_id=frame_id, video_id=video_id, img_shape=img_shape, instances = [Instance.dummy(gt_track_id=i) for i in range(n_instances)]) class AssociationMatrix: @classmethod def dummy(cls, n_ref, n_query): return cls(torch.randn(n_query, n_ref), ref_instances = [Instance.dummy(gt_track_id=i, pred_track_id=i) for i in range(n_ref), query_instances = [Instance.dummy(gt_track_id=i) for i in range(n_query)])
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It might be useful to have class functions to create dummy data using
dreem.io.Frame
,dreem.io.Instance
, anddreem.io.AssociationMatirx
eg
The text was updated successfully, but these errors were encountered: