Gabriele commited on
Commit
df8dbf3
·
1 Parent(s): def9b0d

Add print statements with descriptive comments to code examples

Browse files
Files changed (1) hide show
  1. README.md +4 -3
README.md CHANGED
@@ -36,14 +36,15 @@ pixel_values = transform(image).unsqueeze(0).cuda()
36
 
37
  # All tasks at once
38
  outputs = model(pixel_values)
39
- outputs.depth # (B, 1, H, W)
40
- outputs.normals # (B, 3, H, W)
41
- outputs.segmentation # (B, 150, H, W)
42
 
43
  # Or individual tasks (only runs the requested head)
44
  depth = model.predict_depth(pixel_values)
45
  normals = model.predict_normals(pixel_values)
46
  seg = model.predict_segmentation(pixel_values)
 
47
  ```
48
 
49
  ## Model details
 
36
 
37
  # All tasks at once
38
  outputs = model(pixel_values)
39
+ print(outputs.depth.shape) # (1, 1, 448, 448) — depth map
40
+ print(outputs.normals.shape) # (1, 3, 448, 448) — surface normals
41
+ print(outputs.segmentation.shape) # (1, 150, 448, 448) — segmentation logits
42
 
43
  # Or individual tasks (only runs the requested head)
44
  depth = model.predict_depth(pixel_values)
45
  normals = model.predict_normals(pixel_values)
46
  seg = model.predict_segmentation(pixel_values)
47
+ print(seg.argmax(dim=1).shape) # (1, 448, 448) — per-pixel class prediction
48
  ```
49
 
50
  ## Model details