{"id":29274797,"url":"https://github.com/stacylkv/preset-from-pair","last_synced_at":"2026-04-18T00:02:40.674Z","repository":{"id":301988769,"uuid":"1008681123","full_name":"stacylkv/preset-from-pair","owner":"stacylkv","description":"Create a LUT model from a pair of images.","archived":false,"fork":false,"pushed_at":"2025-06-30T00:23:28.000Z","size":19410,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-30T01:35:19.669Z","etag":null,"topics":["cv2","lut","matplotlib","nympy","opencv","pickle","sklearn","tqdm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stacylkv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-25T23:47:37.000Z","updated_at":"2025-06-30T00:32:58.000Z","dependencies_parsed_at":"2025-06-30T01:35:22.594Z","dependency_job_id":"d84e2970-4b45-4eae-82bf-3d34410e417d","html_url":"https://github.com/stacylkv/preset-from-pair","commit_stats":null,"previous_names":["stacylkv/preset-from-pair"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stacylkv/preset-from-pair","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacylkv%2Fpreset-from-pair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacylkv%2Fpreset-from-pair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacylkv%2Fpreset-from-pair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacylkv%2Fpreset-from-pair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stacylkv","download_url":"https://codeload.github.com/stacylkv/preset-from-pair/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacylkv%2Fpreset-from-pair/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020901,"owners_count":26086948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cv2","lut","matplotlib","nympy","opencv","pickle","sklearn","tqdm"],"created_at":"2025-07-05T05:00:38.579Z","updated_at":"2025-10-14T20:34:13.800Z","avatar_url":"https://github.com/stacylkv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎨 Preset-From-Pair — Generate a LUT from Before/After Images\n\nThis script allows you to **create a LUT model (color transformation)** from a pair of images — a raw image (`before`) and its edited version (`after`, e.g. from Tezza or VSCO) — and then **apply that color style to an entire folder of images**.\n\n---\n\n## 📂 What the Script Does\n\n1. Loads a pair of images: `original.jpg` (before editing) and `target.jpg` (after editing).\n2. Builds a LUT model based on the color differences between them.\n3. Applies the LUT to every image in the `input_images/` folder.\n4. Saves the results in the `output_images/` folder.\n5. (Optional) Displays a side-by-side **Before/After preview**.\n\n---\n\n## 🚀 How to Use\n\n1. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n2. Prepare the following files/folders:\n   - `original.jpg` — original image (unprocessed)\n   - `target.jpg` — edited version with your desired style\n   - `input_images/` — folder with images you want to style\n\n3. Run the script:\n   ```bash\n   python main.py\n   ```\n\n4. The styled images will appear in the `output_images/` folder.\n\n---\n\n## 🧪 Example Use Case\n\n- `original.jpg`: raw photo from your camera\n- `target.jpg`: styled photo from Tezza or another app\n- The script \"learns\" the aesthetic from `target` and applies it to others\n\n---\n\n## 🧠 Features\n\n- Saves the LUT model to `lut_model.pkl`\n- Reuse the LUT by loading it later with `load_lut(path)`\n- Displays Before/After comparison with matplotlib\n- Fast and customizable\n\n---\n\n## 📦 Dependencies\n\nUse the following `requirements.txt`:\n\n```\nnumpy\u003e=1.24\nopencv-python\u003e=4.8\nmatplotlib\u003e=3.7\ntqdm\u003e=4.65\nscikit-learn\u003e=1.3\n```\n\n---\n\n## 🧊 Potential Improvements\n\n- Export to `.cube` LUT format\n- Support for video input\n- GUI for non-programmers\n\n---\n\n## 📸 Author\n\nBuilt for creative workflows and quick aesthetic color transfer between images.  \nUseful for automating styles inspired by apps like Instagram, Tezza, VSCO, and more.\n\n\u003e **Note:** This project is in the development stage.  \n\u003e In addition to `lut-filter.py`, there are two other Python scripts in this repository that can modify your images without LUT generation:\n\u003e - [`Simple Color Shift`](src/simple-color-shift.py) \n\u003e - [`Brightness Contrast Adjust`](src/brightness-contrast-adjust.py)\n\u003e Both scripts applie a Tezza-like style to images by adjusting exposure, brightness, fade, and warmth, but in different way. It processes all images in the specified input directory and saves the adjusted images to the output directory.\n\n### 🧪 Usage\n\n1. Place your input images in the `input_images` folder.\n2. Run the script.\n3. The processed images will be saved in the `output_images` folder.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstacylkv%2Fpreset-from-pair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstacylkv%2Fpreset-from-pair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstacylkv%2Fpreset-from-pair/lists"}