{"url":"/dataset/lsmi","name":"LSMI","full_name":"Large Scale Multi-Illuminant dataet","description_markdown":"# Large Scale Multi-Illuminant (LSMI) Dataset for Developing White Balance Algorithm under Mixed Illumination (ICCV 2021)\r\n\r\n<!-- ABOUT THE PROJECT -->\r\n## Change Log\r\n\r\n**LSMI Dataset Version : 1.1**\r\n\r\n1.0 : LSMI dataset released. (Aug 05, 2021)\r\n\r\n1.1 : Add option for saving sub-pair images for 3-illuminant scene (ex. _1,_12,_13) &amp; saving subtracted image (ex. _2,_3,_23) (Feb 20, 2022)\r\n\r\n## About\r\n[[Paper]](https://dykim.me/publication/lsmi/LSMI.pdf)\r\n[[Project site]](https://dykim.me/publication/lsmi/) \r\n[[Download Dataset]](https://forms.gle/EjBAUzrrsWBxGX4o7)\r\n[[Video]](https://youtu.be/i8OAdYryig0)\r\n\r\nThis is an official repository of **\"Large Scale Multi-Illuminant (LSMI) Dataset for Developing White Balance Algorithm under Mixed Illumination\"**, which is accepted as a poster in ICCV 2021.\r\n\r\nThis repository provides  \r\n1. Preprocessing code of \"Large Scale Multi Illuminant (LSMI) Dataset\"\r\n2. Code of Pixel-level illumination inference U-Net\r\n3. Pre-trained model parameter for testing U-Net\r\n\r\nIf you use our code or dataset, please cite our paper:\r\n```\r\n@inproceedings{kim2021large,\r\n  title={Large Scale Multi-Illuminant (LSMI) Dataset for Developing White Balance Algorithm Under Mixed Illumination},\r\n  author={Kim, Dongyoung and Kim, Jinwoo and Nam, Seonghyeon and Lee, Dongwoo and Lee, Yeonkyung and Kang, Nahyup and Lee, Hyong-Euk and Yoo, ByungIn and Han, Jae-Joon and Kim, Seon Joo},\r\n  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},\r\n  pages={2410--2419},\r\n  year={2021}\r\n}\r\n```\r\n\r\n## Requirements\r\nOur running environment is as follows:\r\n\r\n- Python version 3.8.3\r\n- Pytorch version 1.7.0\r\n- CUDA version 11.2\r\n\r\nWe provide a docker image, which supports all extra requirements (ex. dcraw,rawpy,tensorboard...), including specified version of python, pytorch, CUDA above.\r\n\r\nYou can download the docker image [here](https://hub.docker.com/r/dongyoung95/torch1.7_lsmi).\r\n\r\nThe following instructions are assumed to run in a docker container that uses the docker image we provided.\r\n\r\n<!-- GETTING STARTED -->\r\n## Getting Started\r\n### Clone this repo\r\nIn the docker container, clone this repository first.\r\n\r\n```sh\r\ngit clone https://github.com/DY112/LSMI-dataset.git\r\n```\r\n\r\n### Download the LSMI dataset\r\nYou should first download the LSMI dataset from [here](https://forms.gle/EjBAUzrrsWBxGX4o7).\r\n\r\nThe dataset is composed of 3 sub-folers named \"galaxy\", \"nikon\", \"sony\".\r\n\r\nFolders named by each camera include several scenes, and each scene folder contains full-resolution RAW files and JPG files that is converted to sRGB color space.\r\n\r\nMove all three folders to the root of cloned repository.\r\n\r\nIn each sub-folders, we provides metadata (meta.json), and train/val/test scene index (split.json).\r\n\r\nIn meta.json, we provides following informations.\r\n\r\n- NumOfLights : Number of illuminants in the scene\r\n- MCCCoord : Locations of Macbeth color chart\r\n- Light1,2,3 : Normalized chromaticities of each illuminant (calculated through running 1_make_mixture_map.py)\r\n\r\n\r\n### Preprocess the LSMI dataset\r\n\r\n0. Convert raw images to tiff files  \r\n   \r\n   To convert original 1-channel bayer-pattern images to 3-channel RGB tiff images, run following code:\r\n\r\n   ```sh\r\n   python 0_cvt2tiff.py\r\n   ```\r\n   You should modify **SOURCE** and **EXT** variables properly.\r\n\r\n   The converted tiff files are generated at the same location as the source file.\r\n\r\n   This process uses **DCRAW** command, with **'-h -D -4 -T'** as options.\r\n\r\n   There is no black level subtraction, saturated pixel clipping or else.\r\n\r\n   You can change the parameters as appropriate for your purpose.\r\n\r\n1. Make mixture map\r\n   ```sh\r\n   python 1_make_mixture_map.py\r\n   ```\r\n   Change the **CAMERA** variable properly to the target directory you want.\r\n\r\n   This code does the following operations for each scene:\r\n\r\n   - Subtract black level (no saturation clipping)\r\n   - Use Macbeth Color Chart's achromatic patches, find each illuminant's chromaticities\r\n   - Use green channel pixel values, calculate pixel level illuminant mixture map\r\n   - Mask uncalculable pixel positions (which have 0 as value for all scene pairs) to **ZERO_MASK**\r\n   \r\n   After running this code, **npy tpye mixture map** data will be generated at each scene's directory.\r\n\r\n   :warning: If you run this code with **ZERO_MASK=-1**, the full resolution mixture map may contains -1 for uncalculable pixels. You **MUST** replace this value appropriately before resizing to prevent this negative value from interpolating with other values.\r\n\r\n2. Crop for train/test U-Net (Optional)\r\n   ```sh\r\n   python 2_preprocess_data.py\r\n   ```\r\n\r\n   This preprocessing code is **written only for U-Net**, so you can skip this step and freely process the full resolution LSMI set (tiff and npy files).\r\n\r\n   The image and the mixture map are resized as a square with a length of the **SIZE** variable inside the code, and the ground-truth image is also generated.\r\n   \r\n   Note that the side of the image will be cropped to make the image shape square.\r\n   \r\n   If you don't want to crop the side of the image and just want to resize whole image anyway, use **SQUARE_CROP=False**\r\n\r\n   We set the default test size to **256**, and set train size to **512**, and **SQUARE_CROP=True**.\r\n\r\n   The new dataset is created in a folder with the name of the CAMERA_SIZE. (Ex. galaxy_512)\r\n\r\n### Use U-Net for pixel-level AWB\r\n\r\nYou can download pre-trained model parameter [here](https://yonsei-my.sharepoint.com/:f:/g/personal/dongyoung_kim_o365_yonsei_ac_kr/EkXIAmMiJApDuaB0HNFUPfYBrNEu1PDCF7deRHDbpZkExw?e=Blw861).\r\n\r\nPre-trained model is trained on 512x512 data with random crop & random pixel level relighting augmentation method.\r\n\r\nLocate downloaded **models** folder into **SVWB_Unet**.\r\n\r\n- Test U-Net  \r\n  ```sh\r\n  cd SVWB_Unet\r\n  sh test.sh\r\n  ```\r\n\r\n- Train U-Net\r\n  ```sh\r\n  cd SVWB_Unet\r\n  sh train.sh\r\n  ```\r\n\r\n## Dataset License\r\n\r\n<a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/4.0/\"><img alt=\"Creative Commons License\" style=\"border-width:0\" src=\"https://i.creativecommons.org/l/by-nc/4.0/88x31.png\" /></a><br />This work is licensed under a <a rel=\"license\" href=\"http://creativecommons.org/licenses/by-nc/4.0/\">Creative Commons Attribution-NonCommercial 4.0 International License</a>.\r\n\r\n\r\n<!-- \r\n## Acknowledgements\r\n\r\n* []()\r\n* []()\r\n* []()\r\n -->","description_withheld":null,"homepage":"https://github.com/DY112/LSMI-dataset","introduced_date":"2021-08-05","introduced_date_note":null,"introduced_by":{"paper":"/paper/large-scale-multi-illuminant-lsmi-dataset-for","title":"Large Scale Multi-Illuminant (LSMI) Dataset for Developing White Balance Algorithm Under Mixed Illumination","first_author":"Dongyoung Kim","url":null},"license":null,"modalities":[{"name":"Images","url":"/datasets/modality/images"}],"tasks":[{"name":"Color Constancy","url":"/task/color-constancy","datasets_with_task":"/datasets/task/color-constancy"}],"languages":[],"variants":["LSMI"],"data_loaders":[],"num_papers_in_archive":6,"source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28"},"benchmarks":[],"papers_with_a_benchmark_row":[],"syntology_totals":{"read_at":"2026-09-24T18:15:14+00:00","papers_with_samples":0,"samples_harvested":0,"samples_ran":0,"samples_unverified":0,"pointer_only_for_licence":0,"papers_with_no_sample_that_ran":0,"note":"the per-paper counts above, summed; not a rate"},"papers_note":"The archive never published its papers-using-dataset list; these are papers with a leaderboard row on this dataset's benchmarks."}