BLOG/UPDATES
From Multi-Class to Binary Collapse: Garbage Detection in Satellite Imagery around Zoopigi
A new model has been trained to classify satellite image patches as either garbage or not_garbage. This differs from previous models by combining a ResNet50 CNN with a multi-class classification approach followed by a final binary collapse.
The model is trained on a labelled multi-class dataset containing a range of common landscape features, such as grass, trees, roads/tracks, and garbage. It then classifies previously unseen satellite image patches according to their best match among these feature classes. Finally, the multi-class predictions are collapsed into a binary result: patches classified as garbage retain the garbage label, while predictions belonging to all other classes are combined into the not_garbage class.
Testing was performed on a realistically weighted dataset, with garbage/not_garbage in an approximately 1 to 3 ratio. This has resulted in a significant improvement in performance over previous models.
|
|
A substantial improvement is observed in overall accuracy. The increase in precision is particularly encouraging, even though it comes at some cost to recall. Poor precision has been one of the main limitations of previous models, with false positives sometimes approaching the number of true positives. In a real-world application, where detected sites might need to be physically inspected and potentially cleaned up, this would result in too many unnecessary site visits for the system to be genuinely useful. The new approach reduces the number of false positives to a much more manageable level. Although the trade-off is that some genuine garbage sites will inevitably be missed, the resulting predictions are considerably more practical for real-world use.
The generalisation of the model has been assessed by collecting and applying it to a set of satellite images collected from an area in Cyprus in the Pitsilia region. This consisted of 18 square km that make up the Zoopigi community boundary. A total of 23,328 image patches were analysed by the model which detected garbage in 987 of these, representing 4.23% of those examined. The performance of the model on this region was assessed by performing three lots of random testing. The results were actually better than for the evaluation data, as illustrated in the following tables:
| Predicted Garbage | Predicted Not Garbage | |
|---|---|---|
| Actual Garbage | 127 (TP) | 6 (FN) |
| Actual Not Garbage | 23 (FP) | 144 (TN) |
| Performance Metrics | |
|---|---|
| Accuracy | 0.90 |
| Precision | 0.85 |
| Recall | 0.95 |
| MCC | 0.81 |
The generated google maps can be found in the link Zoopigi garbage.
I know that datasets of the sort I have developed during study of illegal garbage dumps, labelled and unlabelled, are difficult to find. If these can be of use to anyone elase than I am happy to share. Just look up by contact details and send me a message.
Urban Expansion in Spitali: A Satellite-Based Analysis (2015–2025)
Cyprus is undergoing a rapid expansion in population, primarily due to geopolitical issues in Eastern Europe and the Middle East. Much of this growth has been centred around the town of Limassol, which has grown by between 8% and 10% since 2020.
Associated with this has been a building boom. The village of Spitali, which lies at the northern tip of the Limassol conurbation, has seen extensive expansion of its housing network. To quantify this growth, I used historical satellite imagery together with a CNN-based neural network model (previously trained on buildings elsewhere in Cyprus) to estimate changes in the landscape for the Spitali village environs, specifically detecting the extent of buildings.
The area sampled was approximately 1.5 km by 1 km. Each image patch analysed represented an area of around 150 × 150 square metres. Random sampling indicated that the model achieved an overall accuracy of 93%, with an F-score of 0.89 when applied to the Spitali datasets. This represents strong performance given the training data and application domain.
Two datasets were used: one generated from January 2015 and another ten years later, from June 2025 (the most recent available). The results showed that in 2015 there were 51 image patches that included buildings. By 2025, this had increased to 66, representing a 29% increase. Building has continued apace since the latest high-resolution satellite images became available. I intend to collect updated images as they become available and rerun the models to monitor the rate of change.
Graph Neural Networks
Prototyped some graph neural networks, with a ResNet50 backbone, using pytorch. Graph neural networks model data as nodes and edges to learn from relationships and structure rather than isolated features. In image classification, they represent pixels, regions, or objects as graphs, enabling context-aware recognition that captures spatial and semantic relationships beyond standard CNNs. Promise shown; on the garbage detection domain it exhibited similar performance to that of basic ResNet50.
Model comparison using McNemar's Test.
Can now compare model performanace using McNemar's Test. McNemar’s test is a statistical test used to compare two classification models on the same dataset by evaluating whether their error rates differ significantly. This can now be used to evaluate whether one model is better than another. The screenshot below shows the results of comparing the ResNet50 architecture against MobileNetV3, with ResNet50 winning out on this dataset.
ResUnet support added
ResUnet architecture added as an option to deepTerra. ResUNet is a convolutional neural network that combines U-Net’s encoder–decoder structure with ResNet-style skip connections to improve feature learning and segmentation accuracy, especially on complex images. Applied it to the Cyprus garbage detection domain, where is showed promising results.
Quarries - dataset available
The training and test data used for the Cyprus Quarries investigation is available. Refer to the resources page.
Cyprus Quarries
A new project has been completed to chart the number and location of Cyprus quarries. A supervised learning model was trained and tested against more than 300 verified quarry image patches. The google earth API was used to download a fresh set of satellite images covering almost the entire island. This was divided into more than 185,000 image patches, each representing an area of around 220x220m. When the model was run against this dataset, around 2000 quarry locations were identified, with an accuracy of more than 90%. Full details can be found here.
Garbage Detection Kouris Riverbed
A new (smallish) garbage analysis has been made, this time for the area in Cyprus immediately south of the Kouris reservoir. This covers 6 km^2 following the line of the (usually) dried up river bed, up to the Erimi/Episkopi border. This includes reference to more than 900 suspected garbage dumps, of varying sizes. This can be found at: Garbage map summary. Click one of the colored squares to drill down further.
Garbage detection updates
I've made a few updates to my AI based garbage detection system.
- I've a model that better filters out "trivial" garbage, hopefully focusing on more significant dumps. It's still far from perfect, and is still a work in progress.
- I've created a more device/memory friendly overview of the area covered (roughly 200 sq km covering the Pitsilia region of Cyprus) which shows a checkerboard of 280 approx 200x200m patches. Clicking on one of these pops up a small dialog which details how many garbage sites it has found within that patch, together with a link that pops up a more detailed window showing where it thinks that garbage is. This can be found at: Garbage map summary
Multi-classification via blood cell recognition
Until now, deepTerra has been used exclusively with binary classification datasets. It has now been extended to support multi-class classification problems. As a case study, it was applied to a Peripheral Blood Cell (PBC) dataset containing 17,092 images across eight distinct cell types: neutrophils, eosinophils, basophils, lymphocytes, monocytes, immature granulocytes (including promyelocytes, myelocytes, and metamyelocytes), erythroblasts, and platelets (thrombocytes). The original dataset can be found here. An example image from each category is shown below.
| Class | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| basophil | 0.9015 | 0.9770 | 0.9377 | 609 |
| eosinophil | 1.0000 | 0.8999 | 0.9473 | 1559 |
| erythroblast | 0.9878 | 0.9369 | 0.9616 | 776 |
| immature granulocytes | 0.8441 | 0.9537 | 0.8956 | 1448 |
| lymphocyte | 0.9827 | 0.9357 | 0.9586 | 607 |
| monocyte | 0.9361 | 0.8662 | 0.8998 | 710 |
| neutrophil | 0.9296 | 0.9514 | 0.9403 | 1665 |
| platelet | 0.9991 | 0.9991 | 0.9991 | 1174 |
| Overall Accuracy | 0.9413 | |||
| Macro-average F1 Score | 0.9425 | |||
| MCC | 0.9319 | |||
Investigation into SVM on top of CNN
Various research papers have explored the use of hybrid CNN–SVM architectures for classification tasks. One such example is An Architecture Combining Convolutional Neural Network (CNN) and Support Vector Machine (SVM) for Image Classification.
Inspired by these findings, I experimented with this hybrid approach on one of my garbage detection datasets. I used the CNN's second-to-last layer to extract high-level feature embeddings from the images, replacing the final softmax classification layer with an SVM.
The results were promising. Without the SVM, the model achieved an accuracy of 0.75 and a Matthews Correlation Coefficient (MCC) of 0.52. With the SVM classifier, accuracy improved to 0.84 and MCC to 0.69.
Based on these results, I’ve added a new enhancement task to the deepTerra backlog to support SVM-backed classification pipelines.
Prediction of AML indicative blood cells
Tested out deepTerra on non-satellite based images, by training a CNN model to discriminate between healthy and abnormal blood cells. In just a couple of hours datasets were sourced, models trained, and results evaluated - showing a more than decent 99.9% accuracy in the results. More details here.
Added image sharpening to data augmentation
So far deepTerra has supported the usual geometric image augmentation techniques - scaling, shifting, rotating etc. Just added the first photometric technique - sharpening. Implemented this using CLAHE-based sharpening to the 3-channel RGB images. My studies have suggested that of the various ways to expand an image set, adding sharpening to a pipeline is one of the most powerful methods (see The identification of garbage dumps in the rural areas of Cyprus through the application of deep learning to satellite imagery).
Example images are shown below, pre-sharpened and sharpened:
Unsharpened/Sharpened images
It's possible to specify a percentage of the geometric augmentated images to randomly select for sharpening, depending on how much influence is desired from this technique.Support for ensemble method added to deepTerra
It is now possible to run multiple models against a dataset to improve accuracy, robustness, and generalization compared to any single model. Various ensemble aggregation strategies can be used to determine the final prediction results, based on threshold voting or probability averaging,
The effectiveness of this approach was tested by applying it to the Cyprus garbage project case study. This utilized four models each trained on a balanced dataset of 1224 garbage/not_garbage image patches. The architectures used were: ResNet50, ResNet152, VGG19 and EfficientNetV2. These were each applied individually to a dataset independent of the training data, consisting of 96 garbage/not_garbage patches. The following table shows the results for each model individually and using the ensemble technique.
| Model | Confusion Matrix | Accuracy | Precision | Recall | F1 Score | MCC |
|---|---|---|---|---|---|---|
| ResNet50 | tp: 39, fp: 16, tn: 31, fn: 9 | 0.74 | 0.71 | 0.81 | 0.76 | 0.48 |
| ResNet152 | tp: 39, fp: 14, tn: 33, fn: 9 | 0.76 | 0.74 | 0.81 | 0.77 | 0.52 |
| VGG19 | tp: 18, fp: 8, tn: 39, fn: 30 | 0.60 | 0.69 | 0.38 | 0.49 | 0.23 |
| EfficientNetV2 | tp: 39, fp: 12, tn: 35, fn: 9 | 0.78 | 0.76 | 0.81 | 0.78 | 0.56 |
| Ensemble | tp: 41, fp: 10, tn: 37, fn: 7 | 0.82 | 0.80 | 0.85 | 0.82 | 0.64 |
Cyprus Rock Climbing
Not really to do with land classification or AI, but a website devoted to rock climbing in cyprus has been hosted here. Rock Climbing in Cyprus.