DiskIO
- class scripts.convert.DiskIO(alignments: fs_media.Alignments, images: ImagesLoader, predictor: Predict, arguments: Namespace)
Bases:
objectDisk Input/Output for the converter process.
- Background threads to:
Load images from disk and get the detected faces
Save images back to disk
- Parameters:
alignments (fs_media.Alignments) – The alignments for the input video
images (ImagesLoader) – The input images
predictor (Predict) – The object for generating predictions from the model
arguments (Namespace) – The arguments that were passed to the convert process as generated from Faceswap’s command line arguments
Attributes Summary
Event is set when the DiskIO Save task is complete
Trueif the selected writer can output transparent and it's Draw_transparent configuration item is set otherwiseFalseThe queue that images and detected faces are loaded into.
The thread that is running the image loading operation.
Selected writer's pre-encode function, if it has one, otherwise
NoneThe thread that is running the image writing operation.
Attributes Documentation
- completion_event
Event is set when the DiskIO Save task is complete
- draw_transparent
Trueif the selected writer can output transparent and it’s Draw_transparent configuration item is set otherwiseFalse
- load_queue
The queue that images and detected faces are loaded into.
- load_thread
The thread that is running the image loading operation.
- pre_encode
Selected writer’s pre-encode function, if it has one, otherwise
None- Type:
python function
- save_thread
The thread that is running the image writing operation.
- property completion_event: Event
Event is set when the DiskIO Save task is complete
- property draw_transparent: bool
Trueif the selected writer can output transparent and it’s Draw_transparent configuration item is set otherwiseFalse
- property load_queue: EventQueue
The queue that images and detected faces are loaded into.
- property load_thread: MultiThread
The thread that is running the image loading operation.
- property pre_encode: Callable[[np.ndarray, T.Any], list[bytes]] | None
Selected writer’s pre-encode function, if it has one, otherwise
None- Type:
python function
- property save_thread: MultiThread
The thread that is running the image writing operation.