segment-anything
segment-anything copied to clipboard
Add support for WebP images
Fixes #135
Add support for WebP images.
-
demo/configs/webpack/common.js
- Add
webpto thetestarray in the rule for image files. - Update the
image-webpack-loaderconfiguration to support WebP images.
- Add
-
demo/src/App.tsx
- Update the
loadImagefunction to handle WebP images. - Add error handling for WebP images.
- Update the
-
scripts/amg.py
- Update the
cv2.imreadfunction to support WebP images. - Add conditional handling for WebP images in
cv2.cvtColor.
- Update the
-
scripts/export_onnx_model.py
- Import
cv2module. - Update the
cv2.imreadfunction to support WebP images. - Add conditional handling for WebP images in
cv2.cvtColor.
- Import