class_docstr: Stores keypoint **annotation** data. GT Instances have a `gt_keypoints` property
  containing the x,y location and visibility flag of each keypoint. This tensor has shape
  (N, K, 3) where N is the number of instances and K is the number of keypoints per instance.
  
  The visibility flag follows the COCO format and must be one of three integers:
  * v=0: not labeled (in which case x=y=0)
  * v=1: labeled but not visible
  * v=2: labeled and visible
class_docstr_tok: ["Stores","keypoint","*","*","annotation","*","*","data",".","GT","Instances","have","a","`","gt_keypoints","`","property","containing","the","x",",","y","location","and","visibility","flag","of","each","keypoint",".","This","tensor","has","shape","(","N",",","K",",","3",")","where","N","is","the","number","of","instances","and","K","is","the","number","of","keypoints","per","instance",".","The","visibility","flag","follows","the","COCO","format","and","must","be","one","of","three","integers",":","*","v=0",":","not","labeled","(","in","which","case","x=y=0",")","*","v=1",":","labeled","but","not","visible","*","v=2",":","labeled","and","visible"]
docstr: Create a new `Keypoints` by indexing on this `Keypoints`.
  
  The following usage are allowed:
  
  1. `new_kpts = kpts[3]`: return a `Keypoints` which contains only one instance.
  2. `new_kpts = kpts[2:10]`: return a slice of key points.
  3. `new_kpts = kpts[vector]`, where vector is a torch.ByteTensor
     with `length = len(kpts)`. Nonzero elements in the vector will be selected.
  
  Note that the returned Keypoints might share storage with this Keypoints,
  subject to Pytorch's indexing semantics.
docstr_tok: ["Create","a","new","`","Keypoints","`","by","indexing","on","this","`","Keypoints","`",".","The","following","usage","are","allowed",":","1",".","`","new_kpts","=","kpts","[","3","]","`",":","return","a","`","Keypoints","`","which","contains","only","one","instance",".","2",".","`","new_kpts","=","kpts","[","2:10","]","`",":","return","a","slice","of","key","points",".","3",".","`","new_kpts","=","kpts","[","vector","]","`",",","where","vector","is","a","torch.ByteTensor","with","`","length","=","len","(","kpts",")","`",".","Nonzero","elements","in","the","vector","will","be","selected",".","Note","that","the","returned","Keypoints","might","share","storage","with","this","Keypoints",",","subject","to","Pytorch","'s","indexing","semantics","."]
code: def __getitem__(
      self, item: Union[int, slice, torch.BoolTensor]
  ) -> "Keypoints":
      """
      Create a new `Keypoints` by indexing on this `Keypoints`.
  
      The following usage are allowed:
  
      1. `new_kpts = kpts[3]`: return a `Keypoints` which contains only one instance.
      2. `new_kpts = kpts[2:10]`: return a slice of key points.
      3. `new_kpts = kpts[vector]`, where vector is a torch.ByteTensor
         with `length = len(kpts)`. Nonzero elements in the vector will be selected.
  
      Note that the returned Keypoints might share storage with this Keypoints,
      subject to Pytorch's indexing semantics.
      """
      if isinstance(item, int):
          return Keypoints([self.tensor[item]])
      return Keypoints(self.tensor[item])
  
file_path: gluon-cv/gluoncv/torch/data/structures/keypoints.py
imports: from typing import Any, List, Tuple, Union
  import numpy
  import torch
label_desc: Use image node_id 6 for calling the Keypoints obj's underlying member method code with example usage: obj.__getitem__(item) and returns: Keypoints, Keypoints