MCPcopy Create free account
hub / github.com/YavorGIvanov/sam.cpp / sam_image_preprocess

Function sam_image_preprocess

sam.cpp:355–417  ·  view source on GitHub ↗

ref: https://github.com/facebookresearch/segment-anything/blob/efeab7296ab579d4a261e554eca80faf6b33924a/segment_anything/modeling/sam.py#L164 resize largest dimension to 1024 normalize: x = (x - mean) / std mean = [123.675, 116.28, 103.53] std = [58.395, 57.12, 57.375] TODO: why are these hardcoded !? pad to 1024x1024 TODO: for some reason, this is not numerically identical to pytorch's interpola

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

sam_compute_embd_imgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected