Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding webp, tiff, bmp to allowed_extensions list in imageai/Detection/__init__.py #816

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions imageai/Detection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down Expand Up @@ -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. ")
"Also ensure your per_frame, per_second, per_minute or video_complete_analysis function is properly configured to receive the right parameters. ")