Codelor Color Architecture 🌿🧠
This repository contains the pure PyTorch architecture for Codelor Color, a lightweight Transformer designed for Chroma Key (green screen) segmentation.
Important note: The model weights (.safetensors), training scripts, and inference tools are available on the Hugging Face repository: plimb/codelor-color-1.2
📦 Installation
pip install codelor-color
🚀 Usage
You can instantiate the architecture directly and load your own weights.
import torch
from codelor_color import CodelorColor
# Initialize the architecture
model = CodelorColor(dim=128, depth=8, heads=8, tied_after=4)
# Load your weights
# state_dict = load_file("model.safetensors")
# model.load_state_dict(state_dict)
model.eval()
# Forward pass
img = torch.rand(1, 3, 160, 160)
ref = torch.tensor([[0.20, 0.85, 0.30]]) # Target color (Green)
with torch.no_grad():
prob_mask = torch.sigmoid(model(img, ref))
🏗️ Architecture Details
- ConvNeXt-style Stem: Anti-aliased downsampling for crisp edges.
- Transformer Blocks: 8 blocks with 2D RoPE, QK-Norm, and weight sharing (tied_after).
- Color Cross-Attention: Injects the target RGB color at each block.
- Gated Decoder: FPN-like decoder with deep supervision and a Sobel edge head.
📜 License
MIT License.
Metadata
Release files for codelor-color 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| codelor_color-2.1.0.tar.gz | 6.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| codelor_color-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / codelor_color-2.1.0.tar.gz
| Download URL | codelor_color-2.1.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4435e95cc38d00e28e75ea6ec468c755bc347adfff0246b9c9f1103f295f533c
|
|
BLAKE2b-256 checksum How to use checksums |
a61a6d3e51cc76af57f53ce881fd2d5cd204d520a84433836a5cebae6a300449
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / codelor_color-2.1.0-py3-none-any.whl
| Download URL | codelor_color-2.1.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42eec62b04dab565fbb4d9fe796273c8ceab330b0f8e26b687b97c49a1e92b61
|
|
BLAKE2b-256 checksum How to use checksums |
aa75635f7d2db6a9ea3b5bab216103f97a578616b3280f8e011c643c07ffbd8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for codelor-color 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.