// Field files for grades 2–12Observe. Measure. Explain.
Home / Lab files / How does changing light affect an image classifier’s predictions?
LF-35

How does changing light affect an image classifier’s predictions?

Test the same new shape cards under three measured lighting conditions without retraining the model.
Computer scienceGrades 7–1260–90 minutesHazard lowNGSS SEP 3 — plan and carry out investigationsNGSS SEP 4 — analyze and interpret dataComputer science — evaluate model performance under changed input conditions
The same paper triangle and fixed camera appear under brighter, baseline and dimmer lighting, with the question DOES LIGHT CHANGE AI? above a blank classifier screen.
Compare predictions for the same held-out cards while changing the light at the card.

01 // Question

For one trained shape classifier, how does changing illumination affect predictions for the same held-out cards?

This measures the combined camera-and-model pipeline in one setup. It cannot isolate the model from automatic camera exposure or establish behavior for other systems.

02 // Variables

Independent

Illumination at the test card
  • Brighter diffuse light
  • Baseline room light used for training
  • Dimmer but safely visible diffuse light

Dependent

Classification outcome on the fixed test cards
  • Correct predicted labels out of 30 per condition
  • Class-specific confusion counts
  • Displayed confidence, recorded separately from correctness
Controlledsame trained model · same 30 held-out cards and verified labels · same camera, lens, position, distance and background · same app settings · no retraining · record auto-exposure or lux-meter limits

03 // Hypothesis

IF the same held-out cards are captured under light levels different from the model's training light, THEN some predictions or displayed confidence values may change, BECAUSE illumination can alter the captured appearance, while the size and direction of the effect depend on the camera, model, objects and light setup.

04 // Procedure

1. Choose safe, non-identifying classes

Use equally colored paper circles, triangles and squares on one matte background. Avoid faces, student work and personal images. A teacher selects a school-approved classifier and checks its current account and privacy requirements.

2. Train once under baseline light

Capture 12 distinct training examples per shape in steady, diffuse baseline room light. Keep the camera and card position fixed. Record the tool, visible model/version, date and settings, then train one model. Do not retrain during the lighting comparison.

3. Prepare new test cards

Set aside 10 other cards per shape, for 30 held-out cards total, and write their verified labels before testing. These cards must not appear in training. Mark one fixed card position and one camera position; keep the card facing and background the same in every image.

4. Set three safe light conditions

Use a teacher-approved diffused LED source or room lighting to create baseline, brighter and dimmer conditions. Keep the dim condition safely visible; avoid hot bulbs, direct glare, lasers, flicker and sudden exposure to darkness. If a lux meter is available, measure at the card surface and record readings. If not, use only the named relative conditions—do not invent lux values.

5. Capture every card in every condition

For each of the 30 cards, capture one image in each of the three conditions while keeping the card and camera marks unchanged. Randomize card order within each condition. Lock focus/exposure if the device allows; otherwise record that auto-exposure may change the image. Do not show the model feedback or adjust its settings between captures.

6. Compare correct labels and mix-ups

Run all 90 test images through the same trained model. For each lighting condition, calculate correct predictions ÷ 30 × 100% and keep a confusion matrix by shape. Record confidence as a separate value; high confidence is not evidence that a label is correct. Describe differences as this camera-and-model result only.

Materials // Prepare the bench

  • teacher-approved image classifier
  • 30 non-identifying paper shape test cards
  • 12 separate training captures per class
  • fixed camera or tablet stand
  • matte background and marked card position
  • teacher-approved diffused LED source
  • lux meter if available
  • data sheet and answer key

05 // Data table

Test IDVerified shapeBrighter prediction / confidenceBaseline prediction / confidenceDimmer prediction / confidence
L01circle
L02triangle
L03square
L04circle
L05triangle
L06square
L07circle
L08triangle
L09square
L10circle
L11triangle
L12square
L13circle
L14triangle
L15square
L16circle
L17triangle
L18square
L19circle
L20triangle
L21square
L22circle
L23triangle
L24square
L25circle
L26triangle
L27square
L28circle
L29triangle
L30square

Compare the three light conditions

Test lightingCorrect / 30Incorrect / 30Accuracy (%)Notes on camera exposure
Brighter diffuse
Baseline room light
Dim but safely visible

Check which shape is affected

LightingCircle correct / 10Triangle correct / 10Square correct / 10Common mix-up
Brighter diffuse
Baseline room light
Dim but safely visible

Record measured conditions when available

ConditionLux at card (if measured)Light source / settingFocus/exposure locked?Card visible without glare?
Brighter diffuseyes / noyes / no
Baseline room lightyes / noyes / no
Dim but safely visibleyes / noyes / no

Formula Condition accuracy (%) = correct predictions ÷ 30 × 100%

06 // What to expect

Changing light may alter the camera image and predictions, but this experiment does not predict the direction or size of the effect.

Use the same model and held-out cards under every condition; report actual labels and raw counts.

Automatic exposure, one camera and a small set of paper shapes limit what the result can show.

07 // Lab notes

    08 // Remember

    Keep the object and model fixed while the light changes. A change in the camera image can change a prediction—but one classroom result is not a rule for every AI.

    09 // Train one baseline model

    Use equal-color matte paper circles, triangles and squares so shape is the intended class cue. Capture 12 distinct training images per class under steady baseline room lighting with the camera held at one marked position. Train one model and save the visible tool/version, date and settings. Keep the test cards physically and digitally separate; do not use the same photo in both groups.

    This design asks how one baseline-trained model handles changed test illumination. It does not compare models trained in every lighting condition. If the classifier tool cannot save a trained model or its settings, record that limitation and do not claim the model remained exactly identical across sessions.

    10 // Prepare new test cards

    Set aside ten new cards per class and label them before testing. Mark the camera location, card footprint, card orientation and camera-to-card distance. Photograph the same 30 physical cards under each light condition, giving 90 test images. Use a stable stand rather than hand-holding the camera, and avoid movement between captures.

    The image sensor may change exposure, gain, white balance or focus when lighting changes. Lock those settings if the device permits; if it does not, record that the measured outcome includes camera auto-adjustment. The experiment evaluates the camera-plus-model path as students actually use it, not the isolated neural network weights.

    A fixed camera points at one triangle on a marked test position while a lux meter sits at the card and diffused LED panels show possible light settings; labels read CAMERA FIXED, LUX AT CARD and SAME TEST CARD.
    A lux meter can document the illumination; without one, describe conditions comparatively and do not invent readings.

    11 // Set three safe light conditions

    Choose a baseline room-light setup, a brighter diffuse setup and a dimmer but still clearly visible setup. Keep the light source cool and indirect; do not use hot bulbs, candles, lasers, direct glare or flashing light. A teacher should make adjustments and check that the work area stays safe.

    Measure illumination at the card surface with a lux meter if one is available. Record the meter reading and where it was held. If no meter is available, use only comparative labels such as brighter, baseline and dimmer; do not assign invented lux numbers. Keep other room lights and the background as stable as practical.

    A circle, triangle and square are shown with the same camera in three light panels labeled BRIGHTER, BASELINE and DIMMER.
    Use the same objects and camera marks as the light changes; the illustration does not show prediction results.

    12 // Capture every card in every condition

    Randomize the 30 card IDs and use the same recorded order in each lighting condition. Place each card on the same footprint and capture one image, then repeat the full set under the other conditions. Do not change the class label, model, app options, crop, camera position or distance. Avoid retraining or giving the model feedback partway through.

    For each test ID, record the returned class and any displayed confidence for brighter, baseline and dimmer captures. Keep the verified label alongside every row. If a capture is blurry, obstructed or the card moved off its mark, flag it and repeat under the same condition according to a rule decided before looking at predictions. Preserve the original reading as well as the repeat.

    A computer-vision procedure labeled CAPTURE, CLASSIFY and RECORD shows one triangle, a fixed camera, an abstract classifier and an empty clipboard.
    The camera image passes through the classifier, then the student records the returned label against the key.

    13 // Compare correct labels and mix-ups

    Count correct labels out of the same 30 cards for each condition and calculate the percentage separately. Build a confusion matrix for each light setup, with true shape as rows and predicted shape as columns. Analyze class-level error patterns instead of relying only on overall accuracy. Treat confidence as a second measurement; a confident wrong prediction is still wrong.

    A change can come from object visibility, sensor exposure, color response, model behavior or their interaction. One classroom camera, one model and three paper classes cannot tell which internal feature caused a prediction or establish how other systems behave. Compare the observed counts, state the capture conditions, note any automatic camera processing, and avoid safety or identity uses.

    A completely blank recording sheet titled SAME MODEL · SAME CARDS has empty rows for BRIGHTER, BASELINE and DIMMER and columns CORRECT / 30 and NOTES.
    This blank table contains no scores or predicted direction of change.

    14 // Questions people ask

    Why test the same physical cards in every light condition?

    The card's verified class stays fixed, so a changed prediction can be compared across lighting without also changing which object was tested.

    Does this prove the model itself is sensitive to light?

    It measures a complete capture-and-classification setup. Camera auto-exposure, focus, compression and the classifier can all contribute; record these limits.

    Do we need exact lux measurements?

    A lux meter improves repeatability. If one is unavailable, use clear relative labels such as baseline, brighter and dimmer and avoid claiming numerical illumination values.

    Should we retrain the classifier under every light?

    No. Retraining would change the model between conditions. This test asks how one baseline-trained model responds to changed test illumination.

    Does a lower confidence score mean the classification is wrong?

    Not necessarily. Score correctness by comparing the predicted label with the saved class key, then report confidence separately.

    OPTIONAL KNOWLEDGE CHECK

    Can you explain the investigation?

    YOUR CHECKPOINT0 / 2 answered
    01Which factor do you deliberately change in this investigation?
    02How can you make the comparison more trustworthy?

    How does changing light affect an image classifier’s predictions? · Student Data Sheet

    Question: For one trained shape classifier, how does changing illumination affect predictions for the same held-out cards?

    Hypothesis: If the same held-out cards are captured under light levels different from the model's training light, then some predictions or displayed confidence values may change, because illumination can alter the captured appearance, while the size and direction of the effect depend on the camera, model, objects and light setup.

    Materials

    • teacher-approved image classifier
    • 30 non-identifying paper shape test cards
    • 12 separate training captures per class
    • fixed camera or tablet stand
    • matte background and marked card position
    • teacher-approved diffused LED source
    • lux meter if available
    • data sheet and answer key

    Safety before starting

    • Use a stable, teacher-approved lamp and low-heat light source. Keep bulbs, hot lamps, cords, and liquids apart; do not stare into bright lights or alter electrical equipment.
    • Photograph non-identifying objects only. Check any model's privacy and retention rules before uploading images, and do not treat a small classifier test as a safety or identity check.

    Lab notes

      Variables

      Independent: Illumination at the test card · Dependent: Classification outcome on the fixed test cards

      Keep constant: same trained model · same 30 held-out cards and verified labels · same camera, lens, position, distance and background · same app settings · no retraining · record auto-exposure or lux-meter limits

      Procedure

      1. Choose safe, non-identifying classes: Use equally colored paper circles, triangles and squares on one matte background. Avoid faces, student work and personal images. A teacher selects a school-approved classifier and checks its current account and privacy requirements.
      2. Train once under baseline light: Capture 12 distinct training examples per shape in steady, diffuse baseline room light. Keep the camera and card position fixed. Record the tool, visible model/version, date and settings, then train one model. Do not retrain during the lighting comparison.
      3. Prepare new test cards: Set aside 10 other cards per shape, for 30 held-out cards total, and write their verified labels before testing. These cards must not appear in training. Mark one fixed card position and one camera position; keep the card facing and background the same in every image.
      4. Set three safe light conditions: Use a teacher-approved diffused LED source or room lighting to create baseline, brighter and dimmer conditions. Keep the dim condition safely visible; avoid hot bulbs, direct glare, lasers, flicker and sudden exposure to darkness. If a lux meter is available, measure at the card surface and record readings. If not, use only the named relative conditions—do not invent lux values.
      5. Capture every card in every condition: For each of the 30 cards, capture one image in each of the three conditions while keeping the card and camera marks unchanged. Randomize card order within each condition. Lock focus/exposure if the device allows; otherwise record that auto-exposure may change the image. Do not show the model feedback or adjust its settings between captures.
      6. Compare correct labels and mix-ups: Run all 90 test images through the same trained model. For each lighting condition, calculate correct predictions ÷ 30 × 100% and keep a confusion matrix by shape. Record confidence as a separate value; high confidence is not evidence that a label is correct. Describe differences as this camera-and-model result only.

      Record your observations

      Test IDVerified shapeBrighter prediction / confidenceBaseline prediction / confidenceDimmer prediction / confidence
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           
           

      Compare the three light conditions

      Test lightingCorrect / 30Incorrect / 30Accuracy (%)Notes on camera exposure
           
           
           

      Check which shape is affected

      LightingCircle correct / 10Triangle correct / 10Square correct / 10Common mix-up
           
           
           

      Record measured conditions when available

      ConditionLux at card (if measured)Light source / settingFocus/exposure locked?Card visible without glare?
           
           
           

      Formula: Condition accuracy (%) = correct predictions ÷ 30 × 100%

      Answer key and expected pattern

      Changing light may alter the camera image and predictions, but this experiment does not predict the direction or size of the effect.

      Use the same model and held-out cards under every condition; report actual labels and raw counts.

      Automatic exposure, one camera and a small set of paper shapes limit what the result can show.

      Remember: Keep the object and model fixed while the light changes. A change in the camera image can change a prediction—but one classroom result is not a rule for every AI.