Project-MONAI / Project-MONAI/MONAI
Make more (random) transforms traceable
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.7k
- Forks
- 1.6k
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 20
Description
Is your feature request related to a problem? Please describe.
Knowing which transforms were applied to a sample can be very helpful in debugging the current transform pipeline and odd samples. Unfortunately it seems like currently only spatial transforms implement the TraceableTransform. This makes it hard to debug samples with overly agressive noise settings for example.
Describe the solution you'd like
Implement the TraceableTransform for more/most monai transforms
Additional context
The transforms might often not record all information (e.g. the complete noise tensor of a GaussianNoise transform), but just whether they were applied or which scalars were sampled for the final noise in the iteration is already very useful (e.g. the standard deviation of the noise)
In case it's useful later, this is a small script I used to get an overview of what implements TraceableTransform
from monai import transforms
import pandas as pd
data = []
for item in dir(transforms):
cls = getattr(transforms, item)
if not isinstance(cls, type):
continue
is_transform = issubclass(cls, transforms.Transform)
if not is_transform:
continue
if item.endswith('Dict') or item.endswith('D'):
continue
is_dict_transform = issubclass(cls, transforms.MapTransform)
is_randomizable = issubclass(cls, transforms.RandomizableTransform)
is_traceable = issubclass(cls, transforms.TraceableTransform)
is_invertible = issubclass(cls, transforms.InvertibleTransform)
data.append({
'name': item,
'is_dict_transform': is_dict_transform,
'is_randomizable': is_randomizable,
'is_traceable': is_traceable,
'is_invertible': is_invertible,
})
df = pd.DataFrame(data)
df.to_excel('transform_list.xlsx', index=False)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the TraceableTransform and RandomizableTransform implementations and run the provided inventory script against monai.transforms. Identify which random transforms lack tracing and determine the useful sampled state each should record. Done means the selected transforms implement TraceableTransform with tests covering their recorded application or sampled parameters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100