zamba.models.densepose.config¶
Attributes¶
Classes¶
DensePoseConfig
¶
Bases: ZambaBaseModel
Configuration for running dense pose on videos.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
video_loader_config |
VideoLoaderConfig
|
Configuration for loading videos |
required |
output_type |
str
|
one of DensePoseOutputEnum (currently "segmentation" or "chimp_anatomy"). |
required |
render_output |
bool
|
Whether to save a version of the video with the output overlaid on top. Defaults to False. |
required |
embeddings_in_json |
bool
|
Whether to save the embeddings matrices in the json of the DensePose result. Setting to True can result in large json files. Defaults to False. |
required |
data_dir |
Path
|
Where to find the files listed in filepaths (or where to look if filepaths is not provided). |
required |
filepaths |
Path
|
Path to a CSV file with a list of filepaths to process. |
required |
save_dir |
Path
|
Directory for where to save the output files; defaults to os.getcwd(). |
required |
cache_dir |
Path
|
Path for downloading and saving model weights. Defaults
to env var |
required |
weight_download_region |
RegionEnum
|
region where to download weights; should be one of RegionEnum (currently 'us', 'asia', and 'eu'). Defaults to 'us'. |
required |
Source code in zamba/models/densepose/config.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|
Attributes¶
cache_dir: Optional[Path] = None
class-attribute
¶
data_dir: Path
class-attribute
¶
embeddings_in_json: bool = False
class-attribute
¶
filepaths: Optional[Path] = None
class-attribute
¶
output_type: DensePoseOutputEnum
class-attribute
¶
render_output: bool = False
class-attribute
¶
save_dir: Optional[Path] = None
class-attribute
¶
video_loader_config: VideoLoaderConfig
class-attribute
¶
weight_download_region: RegionEnum = RegionEnum('us')
class-attribute
¶
Functions¶
get_filepaths(values)
¶
If no file list is passed, get all files in data directory. Warn if there
are unsupported suffixes. Filepaths is set to a dataframe, where column filepath
contains files with valid suffixes.
Source code in zamba/models/densepose/config.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
run_model()
¶
Use this configuration to execute DensePose via the DensePoseManager
Source code in zamba/models/densepose/config.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
validate_files(values)
¶
Source code in zamba/models/densepose/config.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
|