Mateen Ulhaq

Results 162 comments of Mateen Ulhaq

There are different ways to deal with this: 1. Pad the image until it is a multiple of 64. 2. A memory-efficient "smart padding" method proposed by Huawei (IIRC). See...

I believe pre-padding before a transform is a necessary evil that even some non-learned codecs use, though I'm guessing they've become more efficient at it throughout the years. Perhaps adaptive...

From my limited testing, it's probably good. However, I did want to test it more thoroughly when working on Ujwal's project to confirm.

EntropyBottleneck's compress/decompress: https://github.com/InterDigitalInc/CompressAI/blob/ee91d536bd934fc1f8b1532f78db4c94072ae26d/compressai/entropy_models/entropy_models.py#L524-L537 Or are you referring to a "frozen"/"serialized"/"exported" model not having access to these functions?

Smart-stripping by default may lead to confusion, and should be mentioned on the homepage/docs. ### Tests ```python def pythonize_enum_member_name(name: str, enum_name: str) -> str: enum_name = casing.snake_case(enum_name).upper() find = name.find(enum_name)...

The source code is here: https://github.com/InterDigitalInc/CompressAI/tree/master/compressai/cpp_exts/rans Pybind11 binds some of these C++ functions to Python using the definitions found inside: ```cpp PYBIND11_MODULE(ans, m) { ... } ```

Thanks for the report. I could add a version check for torch Tensor: if Version(torch.__version__) < Version("2.0.0"): return self._mask(self.context_prediction(y).detach(), "all") return y.new_zeros(self.context_prediction(y.to("meta")).shape) ``` ...but perhaps simpler is just to revert:...

Just to confirm, do you mean that you're running the model's weights through the EntropyBottleneck? Is this for the purpose of compressing an input model's weights? e.g., to compress a...

Create an entropy bottleneck for each set of weights. To get a simple implementation working, I would just use a single channel `EntropyBottleneck(1)` for each. Later, you can increase this,...

Which version/commit of CompressAI is this? The latest version should handle all these things automatically. https://github.com/InterDigitalInc/CompressAI/blob/ee91d536bd934fc1f8b1532f78db4c94072ae26d/compressai/models/base.py#L62-L113 But if you want to figure out what's going on without `git pull`ing the...