Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › ASPP

How to Build a Photovoltaic Panel Defect Segmentation Pipeline with MobileNetV2, FPN and ASPP

By Freedom251 Team · · 11 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A practical photovoltaic thermal-image segmentation pipeline can follow the MFPN-ASPP design reported by Galal and colleagues in Scientific Reports (2026): normalize each 512×640 thermal image, train a MobileNetV2 encoder with an FPN decoder, aggregate context with ASPP, and convert the sigmoid output into a binary anomaly mask. The cited implementation reports mean Dice of 0.8440 and average IoU of 0.7564 over five runs, but those figures describe one study dataset and should not be treated as a guaranteed result on another plant, camera or climate.

This guide turns that workflow into an implementation plan. It explains the data contract, augmentation, tensor flow, loss, validation, inference and deployment safeguards, while keeping the study’s scope clear: the target is binary pixel segmentation of anomalous regions in photovoltaic thermal images, not an all-purpose diagnosis of every possible photovoltaic defect.

As an Amazon Associate I earn from qualifying purchases.

What the pipeline is designed to produce

The model receives a radiometric thermal image and returns one probability for every pixel. A probability at or above 0.5 becomes foreground in the reported inference procedure; foreground means an anomalous region according to the annotation protocol, while background means everything else. The output is therefore a segmentation mask, not a defect name, severity grade, root-cause diagnosis or maintenance order.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The complete workflow has eight stages:

  1. Read the thermal image and its expert binary mask.
  2. Preserve the source geometry at 512×640 pixels and scale thermal values to the [0,1] range.
  3. Split images into training, validation and test partitions without allowing related captures to cross partitions.
  4. Apply the stated geometric and photometric augmentations only to training samples.
  5. Extract multiscale features with MobileNetV2 stages S2, S3, S4 and S5.
  6. Fuse those feature maps in a feature pyramid network (FPN), then process the fused representation with atrous spatial pyramid pooling (ASPP).
  7. Upsample the result to image resolution and use a one-channel sigmoid head to obtain pixel probabilities.
  8. Validate during training, threshold predictions at 0.5 for masks, and calculate Dice and intersection over union (IoU) on the held-out test set.

Dataset and what the published evidence covers

Galal et al. describe the Photovoltaic Thermal Images Dataset, collected at a 66 MW ground-mounted facility in Tombourke, South Africa, from 21–27 January 2019. A UAV-mounted radiometric thermal camera recorded the images under clear, high-irradiance conditions. The corpus contains 1,009 images at 512×640 resolution, each paired with an expert-annotated binary mask. Access is described as research-request based, with an intended-use form. The source article is “MFPN-ASPP: MobileNet feature pyramid with ASPP for photovoltaic panel defect segmentation,” Scientific Reports 16, article 31479 (published 8 October 2026; DOI 10.1038/s41598-026-71340-5).

#1 Best Overall
FellDen Micro Solar Panels with Wire, 5PCS 5V 200mA Photovoltaic Solar Cells Kit
  • [ Package Content ] 5PC 5Voltage 200mA Polycrystalline Solar Panels with Wire
  • [ Dimension] 110mmx60mm/4.33"x 2.36" (L*W); Thickness: 2.5mm/0.1"
  • [ DIY Your Own Model ] Suitable for home lighting and different kinds of low-power DC appliances, for science projects, for solar powered water pump, small solar power system, etc.
  • [ High Quality ] High quality epoxy resin, unique technology to make the components beautiful and strong, anti-wind and snow, increase the service life of solar panels.
Item Reported value Implementation implication
Task Binary pixel segmentation of thermal anomalies Store one binary mask per image and train a foreground/background model.
Image size 512×640 pixels Keep this geometry if your memory budget permits; otherwise document any resize and apply the identical transform to the mask.
Number of images 1,009 Use a deterministic manifest so every image has exactly one partition and mask.
Acquisition site 66 MW ground-mounted facility, Tombourke, South Africa Treat site, season and camera characteristics as part of the data distribution.
Collection window 21–27 January 2019 Do not assume the same appearance in other seasons or operating conditions.
Weather and irradiance Clear, high-irradiance conditions Record conditions when building a broader validation set.
Labels Expert-annotated binary masks Audit mask boundaries and label consistency before training.

Prepare images, masks and partitions

Keep image and mask geometry synchronized

Read the thermal raster and its mask as a pair. Normalize the image values to [0,1] before feeding the network. A geometric operation such as a shift, scale or rotation must use the same transform parameters for both items. Interpolate the image continuously, but use a label-preserving interpolation method for the mask so that edge pixels do not become fractional classes. Reflection padding is the reported choice when a geometric transform exposes pixels beyond the original border.

Do not silently convert thermal values to ordinary visible-light intensities. The model was described for thermal imagery, so preserve the calibrated thermal representation that your camera or dataset supplies and document any conversion.

Make the split leakage-resistant

The paper describes training, validation and test use but does not prescribe a universal percentage for each partition. Choose the proportions for your project and publish them with the manifest. More important than a particular ratio is independence: frames from the same flight line, panel string, burst or near-identical viewpoint should remain in one partition where possible. Otherwise, the validation score can measure visual duplication rather than generalization.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Assign a stable identifier to every image and mask pair.
  • Hash or otherwise verify that a mask belongs to the intended image.
  • Freeze the test manifest before tuning augmentation, loss weights or thresholds.
  • Use the validation partition for model and threshold decisions; use the test partition once for the final report.
  • Keep a record of camera, site, date and operating-condition metadata so cross-condition failures can be diagnosed.

Apply the reported training augmentation

The authors selected their augmentation parameters empirically. Their training recipe uses horizontal flips with probability 0.5, brightness and contrast adjustments with probability 0.5, shifts up to 3%, scaling up to 10%, and rotations up to 15 degrees, with reflection padding for geometric transformations.

Transform Reported setting Why it can help
Horizontal flip Probability 0.5 Exposes the model to mirrored panel layouts when orientation is not semantically meaningful.
Brightness adjustment Probability 0.5 Simulates radiometric variation; keep the range controlled so anomalies are not erased.
Contrast adjustment Probability 0.5 Varies thermal separation between panels and surroundings.
Shift Up to 3% Reduces dependence on exact object position.
Scale Up to 10% Changes apparent anomaly size while retaining panel structure.
Rotation Up to 15 degrees Handles modest UAV or panel-orientation differences.
Padding Reflection padding for geometry Avoids introducing a constant artificial border during transforms.

Use these values as a starting point, not as universal optima. Tune them against validation data, and check that transformed masks still look physically plausible. Photometric changes must not alter the mask; geometric changes must alter image and mask identically.

Rank #2
200W Bifacial Solar Panel, 12V N-Type 18BB, 25.6% High-Efficiency
  • 【High-Efficiency N-Type 18BB Solar Panel】Our AeternaSol 200W solar panel features premium N-Type A+ Grade cells, a high-performance N-type model standing out in the market. Adopting 18 Busbars, it achieves 25.6% high efficiency and stable power output for all scenarios. A+ monocrystalline silicon minimizes microcrack risks; combined with 18BB silver-containing busbars, it ensures low degradation (≤1% first year, ≤0.4% annually) and extended service life, a reliable choice for RV or home backup power.
  • 【IP68 Waterproof】Equipped with an exclusive IP68 Waterproof, our solar panels feature advanced potting technology that creates an impermeable seal to prevent water or steam from reaching internal wires. This design minimizes short-circuit risks to the greatest extent, effectively inhibits rust and corrosion, and ensures the solar panel maintains optimal performance even in harsh weather. The junction box’s excellent thermal conductivity enhances heat dissipation, further extending the lifespan of the entire 200 watt solar panel, which is essential for long-term use of solar panels for rv and outdoor applications.
  • 【Up to 15% More Energy Output | Advanced Bifacial Design】Capture sunlight from both the front and rear sides for increased energy production. Under optimal reflective conditions, this bifacial 200W solar panel can generate up to 15% more energy than traditional single-sided panels, helping charge batteries faster and maximize solar harvest.
  • 【Perfect Fit for Class B Vans & Easy Installation】Measuring 52.76 x 26.38 x 1.18 inches, this 200 watt solar panel is designed to maximize power in a compact footprint — ideal for Class B vans and other tight rooftop spaces. Each panel features pre-drilled holes on the back for quick, hassle-free mounting on large rail mounts or other surfaces, making installation faster and more secure.
  • 【Fast Mounting & Easy Expansion】Pre-drilled design facilitates rapid installation with Z-shaped brackets, angled brackets or upright pole mounts. Freely adjustable angles comprehensively meet installation requirements across diverse scenarios. Standard MC4 plugs allow simple wiring and system growth.

Assemble the MobileNetV2–FPN–ASPP model

MobileNetV2 encoder

MobileNetV2 supplies the encoder and extracts features at stages S2, S3, S4 and S5. Earlier stages retain finer spatial detail, while later stages carry stronger semantic information. If you use a framework implementation with pretrained weights, verify the expected input range and channel order before loading weights; the reported pipeline itself establishes the normalized thermal input and the four feature stages, not a mandatory pretraining source.

FPN decoder and lateral fusion

The FPN creates a top-down pathway. Start with the deepest encoder feature, upsample it to the next spatial scale, and combine it with a lateral 1×1 convolution of the corresponding shallower feature. Continue toward the highest-resolution selected stage. This lets deep features contribute context while shallow features restore boundaries and small structures. The paper reports a fused FPN representation with 128 channels.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
encoder_features = mobileNetV2(image)          # S2, S3, S4, S5
p5 = lateral_1x1(S5)
p4 = lateral_1x1(S4) + upsample(p5, size=S4)
p3 = lateral_1x1(S3) + upsample(p4, size=S3)
p2 = lateral_1x1(S2) + upsample(p3, size=S2)
fused = concatenate([resize_to_common(p2),
                      resize_to_common(p3),
                      resize_to_common(p4),
                      resize_to_common(p5)])
fused = project_to_128_channels(fused)

The pseudocode shows tensor relationships rather than a drop-in library implementation. Choose one framework, make every tensor shape explicit, and test the forward pass with a single 512×640 sample before starting a long training run.

ASPP context module

Feed the fused pyramid representation to ASPP. The reported branches use dilation rates 1, 6 and 12, alongside a 1×1 convolution branch and a global-average-pooling branch. Concatenate the branch outputs and project the result to 256 channels. Dilated branches enlarge the receptive field without discarding the feature map’s grid, while the global branch supplies image-level context.

branches = [
    conv1x1(fused),
    atrous_conv(fused, dilation=1),
    atrous_conv(fused, dilation=6),
    atrous_conv(fused, dilation=12),
    upsample(global_average_pool(fused), size=fused.shape[-2:])
]
context = project_to_256_channels(concatenate(branches))
logits = conv1x1(upsample(context, size=(512, 640)))
probability = sigmoid(logits)

The final 1×1 segmentation head emits one channel. Keep logits and probabilities conceptually separate: calculate the binary loss from the representation your framework expects, apply sigmoid for probabilities, and threshold only when producing a hard mask.

Rank #3
ECO-WORTHY 400W Solar Panels N-Type 4pcs 100 Watt 18V Monocrystalline
  • [25% Efficiency] ECO-WORTHY 100W N-Type Bifacial Solar Panel is built with advanced N-type solar cells and 16BB busbar technology, delivering up to 25% conversion efficiency.Compared to traditional P-type cells, N-type technology offers higher power output and superior reliability, while the 16BB design significantly reduces the risk of hot spots and micro-cracks — ensuring consistent performance and a longer lifespan for your off-grid system.
  • [Outstanding Low-Light Performance] Each panel comes with 35-inch cables. Bypass diodes are pre-installed in a waterproof IP68 rated junction box to minimize power drop caused by shade and ensure excellent performance in low-light environments
  • [The Best DIY Partner for 12V/24V System] Basic generator component for 12V/24V battery charging for on-grid, off-grid and hybrid power system for home, garden, RV, Boat and agriculture.You can also extend your existing system
  • [Effortless Installation for Beginners] Lightweight panels with plug-and-play connectors, and the pre-drilled holes on the back of the panels allow for quick installation on roofs or brackets. Even if you're a beginner, you can install them quickly
  • [1.18-inch Thickness Edge] At 1.18 inches thick, our solar panel offers rapid heat dissipation for stable performance, withstands harsh weather with its sturdy build, and enables easy installation thanks to the extra space—ideal for pros and DIYers alike

Train with combined Binary Cross-Entropy and Dice loss

The study combines Binary Cross-Entropy (BCE) with Dice loss. BCE penalizes incorrect foreground and background probabilities at the pixel level; Dice loss emphasizes overlap and is useful when anomalous pixels occupy a small part of the image. A common implementation is a weighted sum, but the cited description does not establish a universal weighting, so expose the weights as configuration and select them using the validation partition.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
for image, mask in training_loader:
    probability = model(image)
    loss_bce = binary_cross_entropy(probability, mask)
    loss_dice = 1 - soft_dice(probability, mask)
    loss = weight_bce * loss_bce + weight_dice * loss_dice
    optimizer.zero_grad()
    loss.backward()
    optimizer.step()

Log the individual BCE and Dice components as well as their sum. A falling total can hide a worsening overlap term if the weights are poorly balanced. Save the checkpoint selected by validation performance, not by training loss alone. Record the random seed, software versions, optimizer settings, batch size, learning-rate schedule and number of epochs in the experiment manifest; these details are necessary for a reproducible reimplementation even though they are not specified in the paper summary.

Validate and calculate segmentation metrics

Dice coefficient

For binary predictions, Dice is defined as 2TP divided by 2TP + FP + FN. It rewards overlap between the predicted and annotated anomaly regions and is sensitive to missed or spurious pixels. Use probabilities for a soft monitoring metric if desired, but state clearly whether the published score uses thresholded masks.

Intersection over union

IoU, also called the Jaccard index, is TP divided by TP + FP + FN. It is stricter than Dice for the same overlap because the union penalizes both types of error. Calculate both metrics from the same held-out predictions and report how empty-mask cases are handled.

Reported result Value Qualification
Mean Dice 0.8440 Galal et al., 2026; mean over five runs on the study evaluation setup.
Average IoU 0.7564 Galal et al., 2026; average on the same study setup.
Compared models U-Net, LinkNet, FPN, Mask-RCNN and YOLO-based variants The reported experiment says MFPN-ASPP outperformed these alternatives in that experiment; this is not a cross-dataset benchmark.

For a new project, add per-image distributions rather than reporting only a mean. Stratify results by anomaly area, panel location, illumination and camera condition. Boundary quality and small-defect recall can reveal failure modes that a single overlap average hides. Keep the annotation protocol fixed when comparing model families.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
KEJNYT Small Solar Panels 1W 5V 200mA, 5-Pack Wire Clips Mini Solar Panel
  • 🏞️【Compact 5V Solar Power for DIY Projects】This 5-pack of 1W 5V 200mA mini solar panels helps power small lights, toys, STEM models, and low-current electronics in direct sunlight.
  • 🏞️【Ready-to-Connect Wire Clip Design】Included wire clips make it easier to attach the panels to simple circuits for testing, classroom builds, or quick DIY setups without soldering.
  • 🏞️【Small Size for Flexible Builds】Each 89.5 x 89.5 mm small solar panel fits compact crafts, garden light repairs, model cars, and project boxes where space is limited.
  • 🏞️【Built for Low-Power Solar Experiments】These solar cells are suitable for learning series or parallel layouts, comparing output, and building simple 5V solar panel projects.
  • 🏞️【Match Before You Connect】Designed for low-current devices, each 1W solar panel should be used with the proper circuit, polarity, and sunlight conditions for better project results.

Run inference and create an auditable mask

  1. Load the selected checkpoint and apply the same thermal normalization used during training.
  2. Disable random augmentation and run the model in evaluation mode.
  3. Resize only if the training contract requires it, and retain the transform metadata.
  4. Apply sigmoid to the one-channel output.
  5. Threshold at 0.5 to reproduce the reported binary-mask procedure, unless a validation study justifies another threshold.
  6. Save the probability raster, binary mask, source-image identifier and model version together.
  7. Render an overlay for human review, using the original thermal image as the background and a transparent color for predicted anomaly pixels.

Keep probabilities, not only hard masks. A maintenance analyst can inspect uncertain regions, and later threshold calibration is impossible if the probability map was discarded. Do not automatically convert a mask into a work order: confirm the result against the thermal image, operating context and an inspection procedure.

Design validation for a real deployment

The authors state: "A limitation of this study is that the proposed MFPN-ASPP model was evaluated on a single photovoltaic thermal image dataset." They call for additional datasets, sensor configurations, operating conditions and analysis across defect sizes. That limitation should determine your acceptance test.

  • Hold out images from a facility or flight campaign not used for model selection.
  • Test the exact camera model, radiometric settings and altitude used in operations.
  • Include cloudy, lower-irradiance and seasonal conditions if those are part of the intended service.
  • Measure small-anomaly recall, false-positive area, boundary accuracy and inference time in addition to Dice and IoU.
  • Have qualified reviewers examine false positives caused by reflections, thermal gradients, vegetation or occlusion.
  • Set a policy for abstaining or escalating when confidence is low or the input distribution differs from training data.

These checks do not make the model universally reliable; they establish whether its behavior is acceptable for a particular site and workflow.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common implementation failures

Predictions have the wrong size

Print the shape after every encoder stage, every FPN merge and the ASPP projection. Ensure every upsampling operation targets an explicit reference size rather than relying on integer scale factors. The final logit tensor must align exactly with the 512×640 mask before loss calculation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Masks look soft or contain unexpected classes

Inspect the mask immediately after loading and after augmentation. A mask should contain the intended binary values. Use nearest-neighbor or another label-preserving interpolation for geometric transforms, and keep brightness or contrast operations away from the mask branch.

Best Value
SOLPERK Solar Panel Kit, Waterproof Solar Battery Trickle Charger Maintainer + Smart MPPT Controller + Adjustable Mount Bracket for Boat Car RV Motorcycle Marine Automotive (20W)
  • 【High Conversion Rate】This 20W solar panel with monocrystalline A+ solar cell has an excellent cell efficiency of 21%-30%. Designed to charge and maintain 12V rechargeable batteries like LiFePO₄, Lithium Ion, AGM, SLA, GEL, EFB, MF, etc. Keep batteries in charged for trailer, tractor, truck, boat, motorcycle, RV, car, lawn mower, water pump, gate opener, electric fence, etc
  • 【Built to Last】 Low-iron tempered glass surface and corrosion-resistant aluminum frame, make this solar panel 100% waterproof and rustproof, and provide the prolonged lifespan up to 25 years. This 12V solar panel can withstand all weather conditions such as sandstorm, strong wind, thunderstorm, blizzard, hail, etc. It can withstand up to 2400Pa wind pressure and 5400Pa snow load
  • 【Smart MPPT Controller】The charging efficiency of this upgraded 10A controller is 30% higher than other controllers on the market. Its intelligent three-stage charging design effectively prevents the battery from overcharging, over-voltage and short circuit. It takes no power from the battery. You will clearly know the charging status of the battery through the two indicator lights on the controller
  • 【360° Adjustable Bracket & Plug-and-Play Installation】Comes with a fully 360° angle adjustable mounting bracket, which allows you to adjust the solar panel to the optimal sun-facing angle for maximum solar energy absorption and higher charging efficiency. Pre-drilled mounting holes and matched screws greatly simplify the installation process, no complicated tools or professional skills are required. All cable connections support plug-and-play, enabling quick and effortless installation and disassembly for both indoor and outdoor scenarios.
  • 【Complete Accessories & Reliable After-Sales Service】Our SOLPERK Solar Panel kit includes 1*20W solar panel, 1*smart MPPT charge controller, 1*adjustable mounting bracket, 1*alligator clip, 1*O-ring and a full set of mounting accessories to meet your diverse installation and use needs. We offer 1-year professional after-sales service and lifetime technical support, with 7×24-hour online customer service to respond to your questions and solve problems within 24 hours, bringing you a worry-free shopping and using experience.

Training loss falls but Dice stalls

Check class prevalence, the BCE/Dice weighting, threshold selection and validation leakage. View probability maps, not just scalar logs. If the model predicts mostly background, verify that foreground pixels survived preprocessing and that the annotation convention is consistent across files.

Validation is unusually strong and deployment is poor

Rebuild the split by flight, panel string or capture session so near-duplicate frames cannot cross partitions. Compare metadata distributions between partitions and evaluate on a genuinely new site or camera before drawing operational conclusions.

Small anomalies disappear

Confirm that the input was not downsampled beyond the documented geometry, inspect the highest-resolution FPN feature, and report metrics by anomaly size. Tune augmentation and loss settings on validation data rather than assuming that the paper’s empirical values are optimal for your sensor.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to compare another architecture fairly

The cited study does not establish a commercial product choice or a universal winner. If you test a different encoder, decoder or detector, use the same held-out images, masks, preprocessing and annotation rules. Compare the following axes in one table:

Axis What to record
Overlap Dice and IoU, with confidence intervals or run-to-run variation.
Small-defect behavior Recall and false-positive area stratified by anomaly size.
Boundary quality Boundary or contour error measured against the same masks.
Generalization Performance on unseen sites, cameras and operating conditions.
Inference cost Latency, memory and throughput on the hardware you will actually deploy.
Operational usability Probability calibration, overlay clarity and human-review time.

Only after those measurements should you decide whether the extra context capacity of ASPP, a different lightweight encoder or a simpler decoder is justified for your application.

Reproducibility checklist

  • Archive the image and mask manifest, partition assignments and metadata.
  • Record normalization, resize, interpolation and padding behavior.
  • Record all augmentation probabilities and ranges.
  • Log the MobileNetV2 feature stages, FPN channel width, ASPP dilation rates and projection width.
  • Save loss definitions, weights, random seeds and checkpoint-selection rules.
  • Store probability maps and hard masks for the test set.
  • Report Dice and IoU with the number of runs and the exact evaluation population.
  • Document camera, site, weather, irradiance and date for every external validation set.

Conclusion

A faithful implementation of the reported approach is a binary thermal-anomaly segmenter built from MobileNetV2 stages S2–S5, a 128-channel FPN fusion path and an ASPP module with dilation rates 1, 6 and 12, followed by a 256-channel projection and sigmoid mask head. Normalize to [0,1], keep image and mask transforms synchronized, train with BCE plus Dice loss, and threshold at 0.5 for the paper’s inference procedure. Treat the published Dice and IoU as study-specific evidence, then earn deployment confidence with independent data from the camera, site and operating conditions your maintenance workflow will encounter.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ASPPComputer VisionFeature Pyramid Networkimage segmentationMobileNetV2photovoltaicsolar maintenancethermal imaging

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.