franzi2505 commited on
Commit
c41e19f
β€’
1 Parent(s): 9add542

update readme

Browse files
Files changed (1) hide show
  1. README.md +42 -9
README.md CHANGED
@@ -20,20 +20,53 @@ This hugging face metric uses `seametrics.segmentation.PanopticQuality` under th
20
 
21
  To get started with PanopticQuality, make sure you have the necessary dependencies installed. This metric relies on the `evaluate`, `seametrics` and `seametrics[segmentation]`libraries for metric calculation and integration with FiftyOne datasets.
22
 
23
- ### Installation
24
-
25
- First, ensure you have Python 3.8 or later installed. Then, install det-metrics using pip:
26
-
27
- ```sh
28
- pip install evaluate git+https://github.com/SEA-AI/seametrics@develop
29
- ```
30
-
31
  ### Basic Usage
32
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  ## Metric Settings
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
  ## Output Values
 
37
 
38
  ## Further References
39
 
 
20
 
21
  To get started with PanopticQuality, make sure you have the necessary dependencies installed. This metric relies on the `evaluate`, `seametrics` and `seametrics[segmentation]`libraries for metric calculation and integration with FiftyOne datasets.
22
 
 
 
 
 
 
 
 
 
23
  ### Basic Usage
24
+ ```python
25
+ >>> import evaluate
26
+ >>> from seametrics.fo_utils.utils import fo_to_payload
27
+ >>> MODEL_FIELD = ["maskformer-27k-100ep"]
28
+ >>> payload = fo_to_payload("SAILING_PANOPTIC_DATASET_QA",
29
+ >>> gt_field="ground_truth_det",
30
+ >>> models=MODEL_FIELD,
31
+ >>> sequence_list=["Trip_55_Seq_2", "Trip_197_Seq_1", "Trip_197_Seq_68"],
32
+ >>> excluded_classes=[""])
33
+ >>> module = evaluate.load("SEA-AI/PanopticQuality")
34
+ >>> module.add_payload(payload, model_name=MODEL_FIELD[0])
35
+ >>> module.compute()
36
+ 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 3/3 [00:03<00:00, 1.30s/it]
37
+ Added data ...
38
+ Start computing ...
39
+ Finished!
40
+ tensor(0.2082, dtype=torch.float64)
41
+ ```
42
 
43
  ## Metric Settings
44
+ The metric takes two optional input parameters: __label2id__ and __stuff__.
45
+
46
+ * `label2id: Dict[str, int]`: this dictionary is used to map string labels to an integer representation.
47
+ if not provided a default setting will be used:
48
+ `{'WATER': 0,
49
+ 'SKY': 1,
50
+ 'LAND': 2,
51
+ 'MOTORBOAT': 3,
52
+ 'FAR_AWAY_OBJECT': 4,
53
+ 'SAILING_BOAT_WITH_CLOSED_SAILS': 5,
54
+ 'SHIP': 6,
55
+ 'WATERCRAFT': 7,
56
+ 'SPHERICAL_BUOY': 8,
57
+ 'CONSTRUCTION': 9,
58
+ 'FLOTSAM': 10,
59
+ 'SAILING_BOAT_WITH_OPEN_SAILS': 11,
60
+ 'CONTAINER': 12,
61
+ 'PILLAR_BUOY': 13}
62
+ `
63
+ * `stuff: List[str]`: this list holds all string labels that belong to stuff.
64
+ if not provided a default setting will be used:
65
+ `
66
+ ["WATER", "SKY", "LAND", "CONSTRUCTION", "ICE", "OWN_BOAT"]`
67
 
68
  ## Output Values
69
+ A single float number between 0 and 1 is returned, which represents the PQ score. The bigger the number the better the PQ score, and vice versa.
70
 
71
  ## Further References
72