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.
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