mmagic.datasets.textual_inversion_dataset¶
Module Contents¶
Classes¶
Dataset for DreamBooth. |
Attributes¶
- mmagic.datasets.textual_inversion_dataset.imagenet_templates_small = ['a photo of a {}', 'a rendering of a {}', 'a cropped photo of the {}', 'the photo of a {}', 'a...[源代码]¶
- mmagic.datasets.textual_inversion_dataset.imagenet_style_templates_small = ['a painting in the style of {}', 'a rendering in the style of {}', 'a cropped painting in the...[源代码]¶
- class mmagic.datasets.textual_inversion_dataset.TextualInversionDataset(data_root: str, concept_dir: str, placeholder: str, is_style: bool = False, pipeline: List[Union[dict, Callable]] = [])[源代码]¶
Bases:
mmengine.dataset.BaseDatasetDataset for DreamBooth.
- 参数
data_root (str) – Path to the data root.
concept_dir (str) – Path to the concept images.
is_style (bool) –
prompt (str) – Prompt of the concept.
pipeline (list[dict | callable]) – A sequence of data transforms.