Commit d5d4a94
authored
fix(dataset): remove incorrect BGR2RGB conversion causing color disto… (#151)
PIL's Image.open().convert('RGB') already loads images in RGB format.
Applying cv.cvtColor(image, cv.COLOR_BGR2RGB) incorrectly assumes the
input is BGR, which swaps the Red and Blue channels. This caused the
visualized 'Original' images to appear with a blue/purple tint. Removed
the unnecessary OpenCV color conversion to preserve the correct RGB
format for matplotlib visualization.
## 🔗 Related Issue
Fixes #
## 📝 Description
-
-
-
## 🔄 Type of Change
- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] 🚀 New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 📖 Documentation update
- [ ] 🏗️ Infrastructure / CI/CD update
## 🧪 Hardware & Matrix Testing
**I have successfully built and tested this code using `uv` on:**
- [x] `anomavision[cpu]` (Standard/Edge)
- [ ] `anomavision[cu121]` (CUDA 12.1)
- [ ] `anomavision[cu124]` (CUDA 12.4)
- [ ] `anomavision[cu118]` (CUDA 11.8)
**Host OS used for testing:**
- [ ] Linux / Ubuntu
- [ ] Windows (Native or WSL2)
- [ ] macOS
## ✅ Developer Checklist
- [x] My code follows the core style guidelines of this project
(Ruff/Black formatting).
- [x] I have run `uv run pytest` and all unit tests pass locally.
- [ ] **Lockfile Guard:** If I added or modified a dependency in
`pyproject.toml`, I have run `uv lock --python 3.10` and committed the
updated `uv.lock` file.
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have updated the documentation accordingly (if applicable).
## 📸 Screenshots / Visual Proof (Optional)2 files changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
432 | 431 | | |
433 | 432 | | |
434 | 433 | | |
435 | | - | |
| 434 | + | |
436 | 435 | | |
437 | 436 | | |
438 | 437 | | |
| |||
446 | 445 | | |
447 | 446 | | |
448 | 447 | | |
449 | | - | |
| 448 | + | |
450 | 449 | | |
451 | 450 | | |
452 | 451 | | |
| |||
0 commit comments