
Possums regularly visit the backyard at night, naturally triggering the curiosity and hunting instincts of our dog, Beau. To prevent potential attacks and injuries to both wildlife and pets, we decided to design a smart mechanism for the dog door that automatically closes when a possum is detected in the backyard, keeping the dog safely inside.
Detecting possums in this environment is challenging: naive motion detectors produce many false positives caused by insects, wind-driven vegetation, mice, and infrared camera noise. The main challenge is therefore to reliably identify possums in low-light conditions while minimizing false alarms.
Limited visibility and IR artifacts make possum detection harder in low-light conditions.
Insects, shadows, rain, vegetation, mice, and wind generate many non-possum ROIs.
Few possum appearances vs many non-possum motions make training CNNs challenging.
Consecutive frames from the same night are nearly identical, leading to redundant ROIs.
Very large number of ROIs need to be classified by the CNN on a continuous camera feed.
Possums may remain still for long periods, making motion-based detection unreliable.
Crops can be partial, occluded, or poorly illuminated, complicating CNN classification.
Creating representative non-possum and possum datasets is time-consuming and labor-intensive.
Data was collected directly from night camera recordings. Motion detection was used to automatically generate Regions of Interest (ROIs), which were then manually reviewed, sorted, and labeled.
ROIs from the same night session were kept together in either train or test sets to prevent temporal data leakage.
ROIs were resized to 224x224 using padding to preserve object proportions rather than distorting features.
Motion-blurred possum images were kept in training to reflect realistic night conditions.
.jpg)


.jpg)
.jpg)

.jpg)
.jpg)
.jpg)

A convolutional neural network (CNN) was trained using transfer learning to distinguish possum vs non-possum ROIs. The pretrained ResNet18 backbone has all layers frozen except the final classification head, which is trained on the custom possum dataset.
The model combines classical motion detection with CNN classification: batch-based training handles many small crops efficiently, while inference is performed per ROI in real-time.
Pretrained ResNet18 backbone with frozen layers
Custom binary classification head (possum / not possum)
Input: motion-based ROIs padded to 224x224
Batch-based training, per-ROI real-time inference
Temporal sliding window: 3/5 frames to confirm detection
The model was trained for 5 epochs using transfer learning with ResNet18, achieving a best test accuracy of 99.61% and demonstrating strong generalization with minimal overfitting.
49.9%
0.9%
0.3%
48.9%
A possum is considered detected only if it appears in at least 3 out of the last 5 processed frames. This sliding window approach:
Reduces single-frame misclassifications
Stabilizes predictions in noisy night conditions
Ensures robust detection when possums move slowly or remain stationary
Real-time examples captured during live camera inference. The system reports a possum detection only after satisfying the temporal consistency rule.





01
Performance degrades in heavy rain, strong wind, or extreme infrared camera noise.
02
Completely static possums may be missed, as detection relies on movement.
03
Possums appear rarely, limiting the diversity of training examples.
04
Low-resolution cameras, poor angles, or distance reduce ROI quality.
05
The model may misclassify unseen objects as possums due to incomplete non-possum coverage.
01
Log detections with timestamps, ROI crops, and bounding boxes to enable graphs and analysis of possum activity over time.
02
Connect detection to devices such as automatic feeding boxes and dog door lock mechanisms.
03
Train a standard CNN from scratch without transfer learning to compare performance with the current ResNet18-based model.
04
Build a web dashboard to track possum visits, visualize patterns, and display historical detection data.