--- license: mit library_name: pytorch pipeline_tag: image-classification tags: - texture - tileability - metric - cvpr2024 --- # TexTile: A Differentiable Metric for Texture Tileability Pretrained weights for **TexTile** [CVPR 2024], a differentiable metric that measures how well a texture image can be tiled with itself without visible seams or repeating artifacts. [Carlos Rodriguez-Pardo](https://carlosrodriguezpardo.es/), [Dan Casas](https://dancasas.github.io/), [Elena Garces](https://www.elenagarces.es/), [Jorge Lopez-Moreno](http://www.jorg3.com/) - Paper: [arXiv:2403.12961](https://arxiv.org/abs/2403.12961) - Code: [github.com/crp94/textile](https://github.com/crp94/textile) ## Files | File | Description | | --- | --- | | `model.safetensors` | Weights in safetensors format. Loaded by the `textile-metric` package. | | `textile_v3.pth` | Original PyTorch state dict (identical weights). | ## Usage ```bash pip install textile-metric ``` ```python import textile from textile.utils.image_utils import read_and_process_image loss_textile = textile.Textile() # downloads model.safetensors from this repo image = read_and_process_image(YOUR_PATH) textile_value = loss_textile(image) ``` The architecture is a ConvNeXt-Base with added linear self-attention layers; see `textile/utils/create_model.py` in the code repository. ## Citation ``` @inproceedings{Rodriguez-Pardo_2024_CVPR, author = {Rodriguez-Pardo, Carlos and Casas, Dan and Garces, Elena and Lopez-Moreno, Jorge}, title = {TexTile: A Differentiable Metric for Texture Tileability}, booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, year = {2024} } ```