git clone https://github.com/Starblessed/iflens.git .uv (recommended)
uv syncpython
python -m venv .venv
.venv\Scripts\activate # Windows
.venv\bin\activate # Linux
pip install .Edit the conditions-example.yaml file with the desired conditions for image classification.
people:
empty: No people visible in the scene.
some: Some people visible in the scene.
crowded: Lively scene crowded with lots of people.
time_of_day:
dawn: Early daylight with low ambient illumination.
morning: Morning daylight with moderate illumination.
noon: Bright overhead daylight with strong illumination.
afternoon: Afternoon daylight with warm angled illumination.
dusk: Fading daylight with low ambient illumination.
night: Nighttime with minimal natural illumination.
precipitation:
clean: No precipitation.
light_rain: Light rainfall with minor visibility reduction.
heavy_rain: Heavy rainfall with significant visibility reduction.
stormfront: Severe storm with intense rainfall and turbulent conditions.
snow: Light snowfall with minor visibility reduction.
heavy_snow: Heavy snowfall with significant visibility reduction.
blizzard: Severe snowfall with strong winds and low visibility.
planet:
earth: Standard picture taken on planet Earth.
mars: Picture taken on planet Mars.Make a copy of the .env.example file, rename it to .env, and fill in the requested API keys:
GEMINI_API_KEY=YOUR_KEY_HERE
GROQ_API_KEY=YOUR_KEY_HEREModify the generation variables in the iflens/main.py script:
NUMBER_OF_SAMPLE_IMAGES: int = 1 # Should be equal to or smaller than the dataset size
DATASET_PATH: str = os.path.join("examples", "street")
CONDITIONS_YAML_FILE: str = "conditions-example.yaml"
KEEP_CLASSES: list[str] = ["planet"] # Prevents the tool from varying specific condition classes
GENERATION_MODEL: str = "gemini-3.1-flash-lite-image"Open a console in the project root directory and run:
uv (recommended)
uv run python -m iflens.mainpython
.venv\Scripts\activate # Windows
.venv\bin\activate # Linux
python -m iflens.main- Car Picture 1: Image by domaxi198 via Pixabay
- Car Picture 2: Image by mrefraim1 via Pixabay
- Car Picture 3: Image by mibro via Pixabay