Skip to content

docs: Classes vignette - #404

Open
srishtiii28 wants to merge 4 commits into
mlverse:mainfrom
srishtiii28:docs/classes-vignette
Open

srishtiii28 wants to merge 4 commits into
mlverse:mainfrom
srishtiii28:docs/classes-vignette

Conversation

@srishtiii28

Copy link
Copy Markdown
Contributor

Closes #396.

Adds a vignette that goes through the S3 classes a dataset item can carry and what is inside each one.

@cregouby cregouby left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Praise It is a very clear explanation of the internals of each and every S3 class, with SVG well structured, including ARIA markup (thanks for that ! )

todo 'Visualization utilities' lives at articles/examples/visualization-utilities.html — reachable from the Examples menu but not from the Articles menu added in this PR. suggestion Moving 'Visualization utilities' vignette into the Articles menu would make the relationship explicit.

Comment thread vignettes/torchvision-classes.Rmd Outdated
| family | dispatches on | acts on |
|---|---|---|
| `transform_*()` | `torch_tensor`, `magick-image`, `array`, `matrix` | the image alone |
| `target_transform_*()` | `object_detection_target`, `segmentation_target` | the target alone |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo misleading The table entry implies that all target_transform_*() functions accept both classes. They do not. The dispatch groups are strictly disjoint:

  • target_transform_resize, target_transform_rotate, target_transform_affine, target_transform_sahi_crop — object_detection_target only
  • target_transform_coco_masks, target_transform_trimap_masks — segmentation_target only

A user who calls target_transform_rotate() on a segmentation_target will get a "no applicable method" error. The table as written directly contradicts that behavior.
suggestion Split the row into two, or add a qualifier such as "detection target transforms" vs "mask-building transforms."

Comment thread vignettes/torchvision-classes.Rmd Outdated
Model outputs are plain lists and carry no class of their own. The object
detection models return `$detections`, one element per image of the batch, each
with `$boxes`, `$labels` and `$scores`; the semantic segmentation models return
`$out`, the per-class logits. The "Visualization utilities" article covers

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo 'Visualization utilities' is not in "Article" and should be turned into a link.
suggestion move the 'visualization utilities' files in the created 'Article' menu.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo missing A Small context introduction of the why we introduced S3 classes is a must.

todo missing As those class are a kind of coverage of torch / vision TVTensors, a trailing paragraph at the end of the vignette for "Comparison with torch / vision TVTensors (advanced)" is worth adding, highlighting the differences for people used to manipulate TVTensors

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add vignette visually explaining all classes and their associated functions

2 participants