YavorGIvanov / sam.cpp

MIT License
1.24k stars 52 forks source link

Add support for images with 4 channels #12

Open YavorGIvanov opened 10 months ago

YavorGIvanov commented 10 months ago

Currently the code in load_image_from_file(..) function is naively written to only support 3 channels and return error if this is not the case. This is very limiting as a lot of images have additional alpha channel in them and we are not able to test SAM with them due to that.

https://github.com/YavorGIvanov/sam.cpp/blob/39aa3ebbe35d5875e6a63f7b3cf60b61b6bd856b/examples/main.cpp#L18

bhavuk2002 commented 9 months ago

can you assign me this? i will work on this.