Loader
- class scripts.extract.Loader(pipeline: ExtractRunner, input_path: str, input_is_file: bool, extract_every: int, skip_existing_frames: bool, skip_existing_faces: bool, is_final: bool)
Bases:
objectLoads images/video frames from disks and puts to queue for feeding the extraction pipeline
- Parameters:
pipeline (ExtractRunner) – The final plugin in the extraction pipeline
input_path (str) – Full path to a folder of images or a video file
input_is_file (bool) –
Trueif the input plugin to the pipeline is an alignments file (fsa or json) so detected faces should be loaded from the file and passed into the pipelineextract_every (int) – The number of frames to extract from the source. 1 will extract every frame, 5 every 5th frame etc
skip_existing_frames (bool) –
Trueif existing extracted frames should be skippedskip_existing_faces (bool) –
Trueif frames with existing face detections should be skippedis_final (bool) –
Trueif this loader is for the final batch being processed
Attributes Summary
The number of frames to be processed
The global FSThread error state object
Trueif the input location is a video file,Falsefor folder of imagesMethods Summary
join()Join the image loading thread and monitor for keyboard interrupts
start(alignments)Set the skip list and start loading images from disk
Attributes Documentation
- count
The number of frames to be processed
- error_state
The global FSThread error state object
- is_video
Trueif the input location is a video file,Falsefor folder of images
Methods Documentation
- join() None
Join the image loading thread and monitor for keyboard interrupts
- Return type:
None
- start(alignments: dict[str, AlignmentsEntry]) None
Set the skip list and start loading images from disk
- Parameters:
alignments (dict[str, AlignmentsEntry]) – Dictionary of existing alignments data for use when importing or skipping existing data
- Return type:
None
- property count: int
The number of frames to be processed
- property error_state: ErrorState
The global FSThread error state object
- existing_count
The number of frames that pre-exist within the alignments file that will be skipped because skip_existing/skip_existing_faces has been selected
- property is_video: bool
Trueif the input location is a video file,Falsefor folder of images
- join() None
Join the image loading thread and monitor for keyboard interrupts
- Return type:
None
- location
Full path to the input location for the loader
- start(alignments: dict[str, AlignmentsEntry]) None
Set the skip list and start loading images from disk
- Parameters:
alignments (dict[str, AlignmentsEntry]) – Dictionary of existing alignments data for use when importing or skipping existing data
- Return type:
None