diff --git a/imageai/Detection/__init__.py b/imageai/Detection/__init__.py index c55428b0..c8bb5867 100644 --- a/imageai/Detection/__init__.py +++ b/imageai/Detection/__init__.py @@ -78,7 +78,7 @@ def __load_classes(self, path: str) -> List[str]: return unique_classes def __load_image_yolo(self, input_image : Union[str, np.ndarray, Image.Image]) -> Tuple[List[str], List[np.ndarray], torch.Tensor, torch.Tensor]: - allowed_exts = ["jpg", "jpeg", "png"] + allowed_exts = ["jpg", "jpeg", "png", "webp", "tiff", "bmp"] fnames = [] original_dims = [] inputs = [] @@ -848,4 +848,4 @@ def detectObjectsFromVideo(self, input_file_path="", camera_input=None, output_f except: raise ValueError( "An error occured. It may be that your input video is invalid. Ensure you specified a proper string value for 'output_file_path' is 'save_detected_video' is not False. " - "Also ensure your per_frame, per_second, per_minute or video_complete_analysis function is properly configured to receive the right parameters. ") \ No newline at end of file + "Also ensure your per_frame, per_second, per_minute or video_complete_analysis function is properly configured to receive the right parameters. ")