Feature Extraction
Transformers
PyTorch
bbsnet
custom_code
thinh-huynh-re commited on
Commit
831aea3
·
1 Parent(s): ac9d131

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -1
README.md CHANGED
@@ -67,8 +67,15 @@ sample = {
67
  """
68
  sample = dataset[index]
69
 
 
 
 
 
 
70
 
71
  """
 
 
72
  preprocessed_sample = {
73
  'rgb': tensor([[[[-0.8507, ....0365]]]]),
74
  'gt': tensor([[[[0., 0., 0...., 0.]]]]),
@@ -78,12 +85,17 @@ preprocessed_sample = {
78
  preprocessed_sample = image_processor.preprocess(sample)
79
 
80
  """
 
 
81
  output = {
82
  'logits': tensor([[[[-5.1966, ...ackward0>)
83
  }
84
  """
85
  output = model(preprocessed_sample["rgb"], preprocessed_sample["depth"])
86
 
 
 
 
87
  postprocessed_sample: np.ndarray = image_processor.postprocess(
88
  output["logits"], [sample["gt"].size[1], sample["gt"].size[0]]
89
  )
@@ -93,7 +105,8 @@ prediction = Image.fromarray(np.uint8(cm.gist_earth(postprocessed_sample) * 255)
93
  Show the predicted salient map and the corresponding ground-truth(GT)
94
  """
95
  prediction.show()
96
- sample["gt"].show()
 
97
  ```
98
 
99
  ### Downstream Use [optional]
 
67
  """
68
  sample = dataset[index]
69
 
70
+ depth: Image.Image = sample["depth"]
71
+ rgb: Image.Image = sample["rgb"]
72
+ gt: Image.Image = sample["gt"]
73
+ name: str = sample["name"]
74
+
75
 
76
  """
77
+ 1. Preprocessing step
78
+
79
  preprocessed_sample = {
80
  'rgb': tensor([[[[-0.8507, ....0365]]]]),
81
  'gt': tensor([[[[0., 0., 0...., 0.]]]]),
 
85
  preprocessed_sample = image_processor.preprocess(sample)
86
 
87
  """
88
+ 2. Prediction step
89
+
90
  output = {
91
  'logits': tensor([[[[-5.1966, ...ackward0>)
92
  }
93
  """
94
  output = model(preprocessed_sample["rgb"], preprocessed_sample["depth"])
95
 
96
+ """
97
+ 3. Postprocessing step
98
+ """
99
  postprocessed_sample: np.ndarray = image_processor.postprocess(
100
  output["logits"], [sample["gt"].size[1], sample["gt"].size[0]]
101
  )
 
105
  Show the predicted salient map and the corresponding ground-truth(GT)
106
  """
107
  prediction.show()
108
+ gt.show()
109
+
110
  ```
111
 
112
  ### Downstream Use [optional]