Skip to Content
AlgorithmsAlgorithms
  • Article
  • Open Access

20 August 2026

25 Pages

Development of an AI-Based Automatic Wild Boar Capture System and Its Field Validation in Island Regions

,
and
Graduate School of Science and Engineering, Ehime University, 3 Bunkyo-cho, Matsuyama 790-8577, Japan
*
Author to whom correspondence should be addressed.

Abstract

This study proposes a stand-alone automatic wild boar capture system using artificial intelligence to reduce damage caused by wild boars. First, a data collection device using a low-cost microcontroller capable of running deep learning models with compact sensors was developed. Based on image data collected in actual field settings, a lightweight model using the YOLO algorithm was constructed. The trained model was deployed directly on a microcontroller, achieving an edge AI recognition device comparable in size to conventional trail cameras. The recognition device was integrated with existing capture mechanisms and box traps to create a selective automatic capture system that activates only when the wild boar has fully entered the trap. Furthermore, a new automatic feeder was developed to improve feeding efficiency and a compact solar power system has also been introduced, thereby achieving a fully automatic, stand-alone system independent of external power sources. Field experiments confirmed that the proposed system can accurately identify wild boars within traps and reliably execute automatic capture operations. Furthermore, the system demonstrated stable operation without issues for over a month, confirming the effectiveness of this stand-alone automatic wild boar capture system.

1. Introduction

In recent years, reports of agricultural damage caused by wild animals such as wild boars, deer, and monkeys have increased in various regions of Japan. Examples of such damage include the ruin of fields due to animals entering farming areas and consuming crops, and cases where citrus fruits ripening on fruit trees are eaten by birds and animals. According to a survey by the Japanese Ministry of Agriculture, Forestry and Fisheries, the damage caused by wildlife to agricultural crops in 2023 reached approximately USD 104 million, and wild boars accounted for the majority of this damage [1].
One cause of crop damage is identified as wildlife expanding their habitats in search of food, as excessive forest clearing and changes in land use have made it difficult for them to secure sufficient food resources [2]. Furthermore, as wildlife habitats have moved closer to human living areas, the frequency of human–animal encounters has increased, causing wildlife to have a direct impact on our lives. In fact, reports of wild boar sightings near major cities and traffic accidents caused by deer collisions have been documented. The impact extends beyond agricultural damage, with serious consequences for regional safety and social infrastructure [3].
In response to these circumstances, the Japanese government has designated Japanese deer and wild boar—which cause particularly severe damage to agriculture, forestry, fisheries, and living environments—as managed wildlife species. Efforts to install electric fences and intensify capture activities are underway [4]. However, coupled with issues such as the decline in hunting license holders and their aging, capture numbers have not increased sufficiently, and the growth in wild boar populations remains unresolved. Consequently, there is a strong demand for the development of effective and labor-saving capture techniques to replace conventional methods.
This problem is not limited to mainland Japan but is also becoming apparent in island regions. In some islands of Ehime Prefecture, wild boars have been confirmed swimming over from other islands, and populations are increasing on islands where they were not previously known to exist [5]. An example of swimming across is shown in Figure 1. In island regions, geographical limitations restrict the personnel and materials available for trapping operations and trap maintenance, making regular patrols and maintenance a significant burden. Therefore, establishing automatic capture technology operable with minimal personnel is a particularly critical challenge for wildlife damage control in island areas [6].
Figure 1. Map showing a documented case of wild boars swimming to the island and the experimental sites.
Currently, capture methods such as snare traps, box traps, and fence traps are widely used. Among these, box traps are employed in many regions due to their simple structure and ease of installation. However, these methods rely on manual operation and patrols. Cases have been reported where traps activated without the target animal fully entering the trap and failed to capture it, or where non-target species were accidentally captured [7]. Consequently, capture efficiency is highly subject to variation based on the installation environment and operational conditions, leaving the challenge of achieving stable capture.
In recent years, automatic capture systems combined with box traps have also been proposed. However, many of these systems use infrared sensors, leading to the problem of high equipment costs. Some commercially available devices exceed USD 1000 in initial cost, preventing widespread adoption [8]. Additionally, while systems exist where operators remotely monitor camera video to operate gates, capturing animals requires continuous surveillance, imposing significant operational burdens [9]. Furthermore, bait commonly used for attraction, such as rice bran, generally necessitates daily on-site replenishment, creating a significant burden in aging rural communities.
On the other hand, research is advancing in the use of camera traps and deep-learning-based image recognition for wildlife monitoring and automated animal identification [10,11,12]. In recent years, studies focusing on wild boars have also been reported. Silva et al. investigated CNN-based wild boar recognition [13], and Schütz et al. reported automated detection and counting of wild boars in camera-trap images [14]. Guo et al. improved a YOLOv8n-based wild boar detection algorithm [15], while Matsuoka et al. evaluated YOLO-family models for wild boar detection using camera-trap images in an island environment [16]. In addition, Verde et al. proposed an IoT-based selective capture system using AI-based infrared cameras, LoRa communication, autonomous feeding, and cage-trap operation [17]. These studies show the usefulness of image recognition and IoT technologies for wild boar monitoring and capture support. However, to reliably translate detection results into successful capture actions, it is essential to determine with high confidence that the animal has fully entered the trap. This requires judgment algorithms to prevent false operation. Existing studies point out that constraints in camera perspective and training datasets can lead to unclear distinctions between inside and outside the trap, potentially causing misclassifications when animals partially enter or move behind the trap [18]. Furthermore, from a long-term operational perspective, power-supply designs that reduce the need for battery replacement and dependence on external power sources, along with labor-saving feeding operations, remain important challenges [19,20]. In particular, many detection-oriented studies do not directly connect recognition outputs to automatic trap-door actuation, and few studies integrate low-cost microcontroller-based edge-AI deployment, an overhead capture-decision method, automatic feeding, and stand-alone solar power into one field-deployable box-trap system.
In our earlier study, the development of an AMB82-mini microcontroller-based automatic capture device and verification through field experiments showed that YOLO-based recognition and electromagnetic-lock actuation can stably capture adult wild boars once they fully enter the box trap. The recognition model, however, was trained mainly on side-view imagery, limiting robustness to camera placement and viewpoint changes. Battery-powered operation constrained continuous uptime, and evaluations were conducted under limited conditions with few individuals and low intrusion frequency, indicating the need for multi-view datasets, more sustainable power subsystems, and validation in island environments where multiple animals and herd behavior are observed [21].
Table 1 summarizes representative studies closely related to the present work and compares their main features with those of the proposed system.
Table 1. Comparison with representative studies on wild-boar detection and capture systems.
To address these challenges, this paper proposes an AI-powered stand-alone automatic capture system equipped with an automatic feeder, aimed at mitigating wildlife damage. The main contributions of this research are as follows:
  • Development of a fully automatic capture system capable of being constructed using only low-cost components and equipped with an automatic feeder.
  • Introduction of a system mounted on the top of the box trap and an AI-based detection and capture decision method utilizing field data from an overhead viewpoint.
  • Verification of the system’s overall operation and long-term operational feasibility through capture experiments in a real-world environment.
For system deployment, with the cooperation of a farmer operating a ranch on Gogoshima Island, box traps and the proposed system were installed along the wild boar’s movement path as they sought feed at the ranch. Figure 2 shows the layout of the ranch and box traps within the experimental field.
Figure 2. The box trap and the cattle feeding area at the Gogoshima Island ranch.

2. System Development and Methods

2.1. Development Overview and Design Requirements

This stand-alone automatic capture system was constructed through multiple stages. First, the development of a survey device that continuously collects data to develop the recognition algorithm was conducted. Next, the recognition output was linked to a capture-decision algorithm and integrated with an electromagnetic lock and the box trap. Finally, an automatic feeder and a solar power subsystem were incorporated, completing a platform that can operate autonomously without depending on external infrastructure.

2.2. Phase 1: Survey Device for Field Data Collection

To improve recognition accuracy and capture decisions, the development of a survey device that acquires image data directly in the field was conducted. The device consists of a low-cost AMB82-mini microcontroller (Realtek Semiconductor Corp., Hsinchu, Taiwan) [22], camera module, PIR sensor, infrared light, and relay module. When the PIR sensor detects animal motion, the controller automatically records still images and short video clips, and infrared light secures adequate image quality at night. All components are housed in a dust- and moisture-resistant ASVEL Tight Lock airtight plastic case (ASVEL Co., Ltd., Yamatokoriyama, Japan; retailer: DCM Daiki, Matsuyama, Japan) measuring 229 × 187 × 85 mm (about 1.27 L), keeping the unit roughly the size of a commercial trail camera while ensuring outdoor durability. It was difficult to collect sufficient top-view images of box traps in earlier work, so a camera was mounted above the trap to record true overhead images, and all components were consolidated on top to minimize the installation area of the device. The developed device was deployed on Gogoshima Island, where a cooperating ranch attracts wild boars searching for feed, enabling efficient behavior-data collection. Duplicate or irrelevant samples were removed before constructing the training and validation datasets. Table 2 summarizes the hardware components used in the survey device for field data collection. Figure 3 shows the overview and internal structure of the survey device developed in this research. An example of the survey device installed above the trap to collect overhead images and a collected data sample is displayed in Figure 4.
Table 2. Hardware components and technical specifications of the survey device.
Figure 3. Overview and internal structure of the survey device.
Figure 4. Example of survey device installation from an overhead viewpoint (left) and collected data sample (right).

2.3. Phase 2: Dataset Construction and Annotation

The training dataset was constructed based on the dataset collected in our previous study and was extended by adding overhead-view image data of box traps newly acquired using the survey device developed in this research. The source material included internet images, trail-camera recordings, and image data collected using the survey device developed in this study; from these sources, trap-scene images relevant to model development, including images of wild boars, non-target animals, and empty box traps without animals, were selected and organized as still images. Duplicate or irrelevant samples were removed before preparing the training and validation subsets. Annotations were created using Microsoft VoTT (Visual Object Tagging Tool; Microsoft Corporation, Redmond, WA, USA) and exported in YOLO format [23]. Figure 5 shows an annotation example. The final model-development dataset was organized as still images; no video files were used directly as training or validation samples. As summarized in Table 3, the dataset contained 3363 images in total, comprising 2945 training images and 418 validation images. The training and validation subsets were prepared at the image-file level. Because the source material included trail-camera recordings and images collected from field devices, temporal correlation may remain between some training and validation samples when visually similar images were obtained from the same or closely related recording periods.
Figure 5. Annotation example created using Microsoft VoTT (Visual Object Tagging Tool) for labeling training data.
Table 3. Dataset organization used for model development.
In this study, seven classes were defined for adult wild boars, juvenile wild boars, raccoons, their in-trap states, and the nothing state, and Table 4 summarizes the corresponding object-label counts for the training and validation datasets. The available object-label records consisted of 4785 training labels and 797 validation labels. Because multiple animals often appear simultaneously in a single image, image counts and label counts are not identical. Figure 6 shows dataset examples. The nothing class was implemented as an actual YOLO class with bounding-box annotations for the interior of an empty box trap. Images in which non-animal objects or visual patterns, such as bait or dark tree shadows, appeared inside the trap were also organized as the nothing class to prevent them from being incorrectly recognized as in-trap wild boars. By explicitly including raccoons as a non-target class, false activations caused by misclassification were suppressed. In addition, juvenile wild boars (mini_boar) were defined separately from adults, allowing the system to handle multi-animal entry conditions requested by field operators.
Table 4. Object-label counts for training and validation datasets.
Figure 6. Dataset examples.

2.4. Phase 3: Recognition Model Training and Edge Deployment

YOLO was adopted as the recognition backbone because it remains lightweight while still supporting real-time inference [24]. Since YOLO analyzes the entire image in a single pass and jointly estimates object locations and classes, it is well-suited to the immediate capture decisions demanded in this work. Informed by previous comparisons of YOLO deployments on the AMB82-mini, YOLOv7-tiny operating on the PyTorch framework (version 2.3.1 with CUDA 12.1) was selected [25]. PyTorch is a dynamic-graph-based deep learning framework designed for flexible and efficient research development [26]. This model selection and parameter configuration were designed as part of the lightweight recognition algorithm, aiming to balance detection stability, model size, and computational feasibility under the limited memory and processing resources of the AMB82-mini. Therefore, the model choice was based not only on general benchmark performance but also on compatibility with the AMB82-mini deployment environment. Table 5 summarizes the rationale for selecting YOLOv7-tiny for edge deployment on the AMB82-mini.
Table 5. Rationale for selecting YOLOv7-tiny for edge deployment.
The configuration derived from yolov7-tiny.yaml was adjusted to the seven classes in our dataset, with an input image size of 640 × 640 pixels, a batch size of 32, and 300 epochs. The training curves in Figure 7 and Figure 8 indicate generally stable convergence of the model. Both the box loss and classification loss decreased consistently for the training and validation datasets. Although a slight increase in the validation objectness loss was observed in later epochs, this may have been caused by environmental variation in real field data, such as bait and background conditions. However, evaluation using test videos showed no clear degradation in detection performance. Therefore, this model was adopted for the proposed system.
Figure 7. Training loss history recorded during Phase 3 model training.
Figure 8. mAP progression recorded during Phase 3 model training.
Before deployment conversion, the trained YOLOv7-tiny model achieved precision = 0.914 , recall = 0.871 , F 1 = 0.892 , mAP @ 0.5 = 0.901 , and mAP @ 0.5 : 0.95 = 0.528 on the validation dataset, while the capture-critical classes yielded AP boar _ in _ trap = 0.997 and AP mini _ boar _ in _ trap = 0.963 . The F1-score was calculated from the final precision and recall values. Figure 9 and Figure 10 show the F1-score curve and confusion matrix obtained before deployment conversion.
Figure 9. F1-score curve of the YOLOv7-tiny model evaluated before deployment conversion.
Figure 10. Confusion matrix of the YOLOv7-tiny model evaluated before deployment conversion.
Directly deploying the trained YOLOv7-tiny weight file on the microcontroller was not feasible because of its file size and computational format. Therefore, the trained model was converted using the AMB82-mini model-conversion toolchain [27]. The YOLOv7-tiny weight file used for conversion was 12.32 MB, whereas the deployed AMB82-mini .nb model was 4.87 MB in UINT8 format, corresponding to an approximately 60.5% reduction in file size. This conversion enabled on-device inference without relying on cloud resources.
The validation metrics reported above were obtained before deployment conversion. The converted .nb model was used for on-device inference and field operation, but its precision, recall, and mAP on the full validation dataset were not systematically re-evaluated after conversion. Therefore, post-conversion accuracy is reported as unavailable rather than estimated.
As a reference for the expected inference speed on the AMB82-mini, this study uses the results of our previous implementation test, in which 163 test images were processed and the processing time was obtained from serial-monitor outputs [25]. Table 6 summarizes the reported inference speed. The PyTorch+UINT8 configuration required approximately 0.20 s per frame, corresponding to about 5.0 FPS. Although the Darknet+UINT8 configuration was slightly faster, the PyTorch+UINT8 configuration was adopted for the YOLOv7-tiny deployment because it provided a better balance between recognition stability and inference speed for the non-target and capture-critical classes.
Table 6. On-device inference speed reported in previous AMB82-mini implementation tests.

2.5. Phase 4: Automatic Capture System

The automatic capture unit combines the survey device developed in this study with the capture mechanism reported previously, as shown in Figure 11. The recognition model outputs detected classes and bounding boxes, which are sent directly to an automatic capture system. Figure 12 shows an example of the internal structure of this system. The system is designed to activate only when the target animal has fully entered the box trap, preventing false operation caused by partial entry or movement outside the cage.
Figure 11. Example of the capture mechanism in use with the box trap and its connection to the survey device.
Figure 12. Internal structure of the automatic capture system.
The box trap used in the field experiment was a commercially available double-door drop-gate type (Inohoi/refactory Inc., Miyazaki, Japan) designed for medium- to large-sized animals such as wild boars and deer [28]. In this study, one of the two doors was kept closed during operation, and the other door was controlled by the automatic capture system. Table 7 summarizes the main specifications of the trap. The original trap is designed as a kick-string-triggered trap; in the proposed system, the capture action was controlled by a RUIZHI 5 V two-channel relay module (RUIZHI/SOUND JP, Shenzhen, China; relay elements: SRD-5VDC-SL-C, Ningbo Songle Relay Co., Ltd., Ningbo, China) and a Yosoo 5 V electromagnetic lock (Yosoo Health Gear, Shenzhen, China) so that the gate was released only when the AI-based capture condition was satisfied. This 5 V lock configuration was adopted to simplify integration with the microcontroller-side control circuit.
Table 7. Main specifications of the box trap used in the field experiment.
During the decision process, only detections inside a predefined decision zone within the trap are evaluated. Figure 13 shows an example of this zone. The red-box ratios were set to represent the area in which a wild boar is sufficiently inside the trap for reliable capture by door closure. This setting is necessary because the recognition model can classify partial entry, such as only the head entering the trap, as boar_in_trap or mini_boar_in_trap. Therefore, this restriction removes detections of animals passing beside the trap or entering with only part of their body. The initial capture-decision procedure is shown in Table 8. The key feature of this algorithm is that it does not directly use the raw detection results for actuation, but instead converts the detection outputs into capture actions based on the detected class, the number of detected individuals, their spatial position within the predefined decision zone, and multiple-frame confirmation. When the capture condition is satisfied, the microcontroller sends a control signal through a relay, which releases the electromagnetic lock and allows the trap door to close automatically. This removes the need for continuous human monitoring. After actuation, the system records the event, sends notifications, and returns to standby or deep-sleep mode to reduce power consumption.
Figure 13. Decision zone definition used for automatic capture. The red frame indicates the predefined decision zone used to judge whether the detected wild boar is sufficiently inside the box trap for reliable capture.
Table 8. Pseudocode of the initial capture-decision algorithm implemented on the AMB82-mini.
Figure 14 shows the processing flow from automatic decision to actuation. Because wild boar group size and behavior change depending on season and location, the software parameters can be adjusted on site, allowing the capture thresholds to be flexibly tuned according to local policies and field conditions.
Figure 14. Flowchart of the capture process.

2.6. Phase 5: Automatic Feeder

To support bait supply into box traps and reduce the labor burden on farmers associated with feeding operations, this study designed and developed an automatic feeder. This device was configured by adding a feeding mechanism to a commercially available line-marker chassis (TOEI LIGHT G2073; TOEI LIGHT Co., Ltd., Soka, Japan), a 12 V DC worm gear motor, an MD13S motor driver (Cytron Technologies Sdn. Bhd., Bukit Mertajam, Malaysia), and a flexible coupling (Aopin/Shenzhen Aopin Network Technology Company Limited, Shenzhen, China) [19]. The line-marker chassis has a nominal calcium-carbonate capacity of 7.5 kg, a rubber-blade mechanism, and a powder-outlet shutter; these features were used as the feed hopper and discharge path for powdered bait. By utilizing the rotating discharge mechanism inside the line-marker chassis, the structure enables stable discharge of powdered feed in consistent quantities. A Bringsmart 12 V 10 rpm DC worm gear motor (Fuzhou Bringsmart Intelligent Tech. Co., Ltd., Fuzhou, China) was adopted as the drive source. The product specification lists a rated voltage of 12 V, no-load speed of 10 rpm, rated speed of 7 rpm, rated torque of 17 kg·cm, and rated current of 0.5 A. The self-locking worm-gear structure also helps prevent unintended shaft rotation when the motor is not energized, while providing stable torque at low rotational speeds for reliable discharge of feed such as rice bran. The motor is connected to the rotary discharge shaft via a flexible coupling and is configured to rotate only while receiving control signals from the microcontroller. Figure 15 shows the internal structure and the developed automatic feeder. When a control pulse is input, the shaft rotates continuously, quantitatively feeding the feed from the hopper to the outlet. When the signal is released, rotation stops, and discharge ceases. This method enables automatic feed supply into the box trap at a predetermined time by driving the motor for a set duration. The feed-dispensing experiment is shown in Figure 16.
Figure 15. Automatic feeder overview.
Figure 16. Feed-dispensing experiment for the automatic feeder.
Rice bran was selected as the bait material because it is commonly used in box-trap management for wild boars in Ehime Prefecture and is inexpensive, available throughout the year, and preferred by wild boars [19]. In addition, some rice-polishing machines in Ehime Prefecture provide rice bran at no cost, making it practical for continuous use by local operators. Rice bran is also consistent with local hunting practices and can be supplied as a powder using the rotary discharge mechanism of the automatic feeder. Therefore, rice bran was suitable for evaluating the proposed labor-saving feeding subsystem without introducing a special bait material that would be difficult for local operators to obtain.
Regarding feeding quantity and interval, based on previously reported findings on attractiveness effects, adjustments were made to achieve approximately 200–300 g per day. Under the settings of this study, the target amount is supplied via a single operation lasting about 30 s per day. The original line-drawing mechanism can hold up to 7.5 kg of calcium carbonate. However, when filled with rice bran (bulk density 0.35–0.45 g/mL) in the same hopper, the effective storage capacity is approximately 2.6–3.4 kg. Assuming a discharge rate of 250 g/day, this enables approximately 7–10 days of unmanned continuous operation.

2.7. Phase 6: Stand-Alone Power System and Low-Power Operation

To enable long-term operation in mountainous and island regions where commercial power is unavailable, this study adopts a stand-alone power system combining a solar panel with a LiFePO4 battery. The main loads of the proposed system are the AMB82-mini, PIR sensor, infrared illuminator, relay module, and INA226 voltage monitor (Texas Instruments Inc., Dallas, TX, USA), while the capture actuator and automatic feeder are excluded from the power-system design conditions because of their low operating frequency.
Based on practical conditions obtained from previous field experiments, assuming 30–50 PIR activations per day and a processing time of 1–1.5 min per event, the total active time amounts to approximately 1–1.25 h per day. With an average power consumption of 8–9 W, the daily energy consumption is estimated to be about 10 Wh. In earlier prototypes using nickel–metal hydride battery packs, the power was depleted in less than three days under these operating conditions. Therefore, this study employs a 12 V, 10 Ah (approximately 120 Wh) LiFePO4 battery, which provides a theoretical operating margin of more than 10 days even in the absence of solar generation. This battery features a stable discharge-voltage profile and provides deep-discharge tolerance, long cycle life, safety, and low weight, making it suitable for unattended outdoor deployment.
The implemented power generation system uses an ECO-WORTHY 25 W solar-panel kit (Xiamen Eco-Sources Technology Co., Ltd., Xiamen, China) consisting of a 25 W panel, a 3 A 12/24 V charge controller, and a 12 V, 10 Ah LiFePO4 battery. Power is supplied to the microcontroller and peripheral devices via the controller’s 5 V USB output. Furthermore, this proposed system monitors the PIR activation and battery voltage, transitioning to deep sleep mode periodically as needed to reduce power consumption. Although the system is operated as a 12 V system, the observed LiFePO4 battery voltage during normal charged operation was approximately 13.3–14.3 V, and the voltage decreases when solar charging is insufficient because of weather conditions. Therefore, the low-voltage threshold was set to 12.4 V as a conservative control point. In this implementation, the sleep interval is extended when the battery voltage decreases below 12.4 V to suppress unnecessary activation and prevent over-discharge.

2.8. Integrated System and Field Deployment Procedure

By integrating the above elements, this study constructed a fully stand-alone automatic capture system comprising a survey device, recognition model, automatic capture determination and electromagnetic lock activation mechanism, automatic feeder, and solar power subsystem. This device can be constructed for approximately USD 240 or less, including all mechanisms, achieving significant cost reduction compared with existing research using devices like the Jetson Nano. Table 9 shows the component list. Figure 17 shows the system configuration of the proposed system: Figure 17a shows the automatic capture system integrating an automatic feeder and a stand-alone power system, and Figure 17b shows the internal structure of the integrated system. For field installation, the survey device is mounted on top of the box trap, and adjustments are made to ensure the entire interior of the box trap is within the field of view. Next, the decision zone is calibrated to ensure partial intrusions are excluded from the activation criteria. During operation, the system activates upon PIR sensor detection. After confirming battery voltage, it enables infrared illumination and executes YOLO inference and video recording. Concurrently, it determines the operational status of the automatic feeder and executes feeding if conditions are met. Subsequently, only detection results meeting capture conditions trigger the electromagnetic lock. After activation, the system performs log saving and notification processing before transitioning to standby or deep sleep mode. The processing flow is shown in Figure 18. The process from PIR detection to deep sleep was designed as a stand-alone control algorithm for operation under an independent power-supply environment.
Table 9. Device Components List.
Figure 17. System configuration of the proposed system. In (a), red circles and arrows indicate the installed positions of the survey device and related units. In (b), the green dashed box indicates the stand-alone power and feeding subsystem; red lines indicate power-supply wiring, black lines indicate ground wiring, and green lines indicate control-signal wiring.
Figure 18. Flow diagram of the integrated system.

3. Experiments

This section reports the field evaluation according to the installation layout shown in Figure 19. Section 3.1 covers the capture experiments conducted with the Phase 4 automatic capture device, Section 3.2.1 summarizes the operation of the automatic feeder, and Section 3.2.2 describes the behavior of the stand-alone integrated system. In every deployment, the device was fixed above the box trap so that an overhead viewpoint was maintained and continuous data collection was possible throughout long-term operation.
Figure 19. Field installation example of the automatic capture device from a top view.

3.1. Field Test of Automatic Capture System

Experiments on Gogoshima Island confirmed that wild boars primarily approached at night. The combination of infrared light and an overhead camera provided sufficient visibility for stable recognition. Table 10 summarizes the field-test conditions and available field statistics. Total PIR activations, total animal visits, missed detections, false-negative frequency, and non-capture visits were not systematically logged; therefore, the reported field performance should be interpreted within the scope of the available capture-event records.
Table 10. Summary of field-test statistics on Gogoshima Island.
During the initial period (26 August to 9 September), no false activation was confirmed, and the system consistently captured two wild boars in each operation. However, on 10 and 19 September, only one wild boar was captured each time. Analysis of the 19 September field record indicated that rice bran bait placed inside the box trap could sometimes be misidentified as the mini_boar_in_trap class. In addition, the decision zone had been set slightly wider during this period, which may have allowed the capture condition to be satisfied before multiple animals had fully entered the trap. These observations suggest that practical false-positive sources in field deployment are not limited to non-target animals, but also include bait appearance, decision-zone calibration, and environmental background conditions.
To reduce the effect of transient false detections, the capture logic was subsequently modified so that relay activation was performed only when the capture condition persisted for five consecutive YOLO frames within the decision zone. This temporal filtering algorithm requires detection continuity before triggering the capture mechanism. Following this improvement, no subsequent false activation was confirmed in the recorded capture operations. Overall, the system autonomously captured 10 wild boars in seven recorded capture events. Table 11 lists the capture log, and Figure 20 shows examples of captured individuals recorded during field testing from August to October 2025.
Table 11. Automatic capture log on Gogoshima between August and October 2025 (JST).
Figure 20. Captured wild boars recorded during field testing between August and October 2025. The red frames indicate detected wild boars.

3.2. Integrated System Operation

3.2.1. Automatic Feeder Operation

During the approximately one-week trial period, the automatic feeder operated as set to dispense feed once daily, confirming stable automatic performance. Natural food resources were readily available in surrounding citrus farms and other areas during this period, and no wild boars were recorded entering the trap. Data from the survey device shown in Figure 21a revealed that crows gathered in response to the dispensed feed. Furthermore, as shown in Figure 21b, the number of crows entering increased immediately after feeding began. No trap activation caused by birds was confirmed in this trial.
Figure 21. Crow response during the feeder trial.

3.2.2. Stand-Alone Power System Operation

To verify the validity of the energy design, this system was operated on Gogoshima Island using the 12 V solar panel and LiFePO4 battery described in Section 2.7. Figure 22b shows the voltage data over one month. During this one-month power test, the automatic feeder was operated once per day for approximately 30 s. In contrast, the capture actuator was not activated because no capture event requiring relay actuation occurred during this period. Despite variations in solar radiation, the battery voltage consistently stayed above the operational threshold, and no system shutdowns occurred even during overcast conditions. These results confirm that, under the tested deployment and weather conditions, the power configuration combining solar panels, a LiFePO4 battery, voltage monitoring, and deep-sleep control can support recognition, logging, communication, daily feeding operation, and capture-control standby operation without relying on an external power source.
Figure 22. Battery voltage during stand-alone operation.

4. Discussion

4.1. Recognition Robustness and Decision Stability

Recognition performance is highly dependent on the distribution of training data. In actual field operations, changes in lighting conditions, shadows, raindrops, reflections, swaying vegetation, and even bait inside traps can alter how images appear and potentially cause false detections. The misclassification of rice bran observed on Gogoshima Island demonstrates that such errors are more likely to occur when the training dataset lacks images explicitly containing bait or insufficiently includes bait of various shapes and arrangements. The feeder trial also showed that crows were attracted to the dispensed feed. Although no trap activation caused by birds was confirmed in this study, this observation indicates that automatic feeding can introduce non-target animals into the recognition scene and thereby increase the importance of false-positive control. Therefore, future dataset expansion should not only increase the amount of data but also intentionally include easily confused factors, such as bait, birds, shadows, reflections, and vegetation movement. In the present model, these factors were not defined as independent confusing classes, and their false-detection frequencies were not systematically quantified; this is treated as a limitation of the current validation.
Furthermore, relocating the camera to an overhead position and introducing the mini_boar class enabled the dataset to reflect the frequent herd intrusion scenarios encountered in actual field settings. However, herd behavior causes individuals to overlap, making detection counts prone to fluctuation frame-by-frame. Consequently, when using detection counts for capture determination, it is desirable to evaluate them in combination with temporal stability. From the viewpoint of algorithmic analysis, combining the predefined decision zone, class conditions, object-count rules, and the consecutive-frame condition enabled unstable detection outputs to be converted into more stable capture control actions.
Although the overhead camera position was introduced to make the inside/outside relationship of the box trap clearer and to reduce partial-entry ambiguity, this study did not conduct a controlled side-by-side comparison between side-view and top-view cameras under identical field events. Therefore, the benefit of the top-down viewpoint should be interpreted as a design rationale and field-implementation advantage, rather than as a quantitatively verified improvement in detection accuracy or false-positive reduction. A future study should evaluate synchronized side-view and top-view recordings of the same trap events to quantify viewpoint-dependent differences in false positives, missed detections, and capture-decision stability.
Compared with the related studies summarized in Table 1, the added value of this study is not limited to wild boar detection itself, but lies in linking the detection output to automatic capture actuation under field conditions. From the detection viewpoint, the strength of the proposed system is that the YOLOv7-tiny model was deployed on a low-cost microcontroller and used with overhead trap-scene images and a predefined decision zone. This configuration was designed to address partial-entry situations that are directly relevant to capture operation. However, the dataset size and validation conditions were more limited than those of large-scale camera-trap monitoring studies, and the post-conversion .nb model was not systematically re-evaluated on the full validation dataset. From the trapping-system viewpoint, the strength is that recognition, capture actuation, automatic feeding, and stand-alone solar power were integrated and tested in an actual island field environment. The weakness is that field validation was conducted at a single site and season, and the effectiveness of the automatic feeder and long-term robustness across different regions were not quantitatively verified.

4.2. System Integration and Operational Considerations

This study integrated recognition, capture, and an automatic feeder with an autonomously operated solar power supply, verifying operation in a real field environment. The absence of shutdowns due to voltage drops over approximately one month indicates that the power supply design—combining a 12 V solar panel, LiFePO4 battery, voltage monitoring, and deep sleep control—was a practical configuration capable of supporting long-term operation under the tested deployment conditions. This interpretation is supported by the energy design assumptions used in this study: 30–50 PIR activations per day, 1–1.5 min of active processing per event, an average active-mode power consumption of 8–9 W, and an estimated daily energy consumption of approximately 10 Wh. With a 12 V, 10 Ah LiFePO4 battery, the theoretical battery-only operating margin exceeds 10 days under these assumptions.
Furthermore, if sufficient battery capacity is confirmed during operation, enhancements to improve observation quality—such as extending recording time or introducing additional sensors—may be feasible. However, the present power validation was based mainly on battery-voltage logging, and it did not quantify solar irradiance, ambient temperature, continuous-rain duration, or subsystem-level current consumption. Therefore, the result should not be interpreted as a universal guarantee of long-term operation across all seasons or weather conditions. Future validation should log irradiance, temperature, PIR-trigger frequency, active-mode duration, and current consumption of the recognition, infrared illumination, communication, feeding, and relay subsystems during prolonged cloudy or rainy periods.
While the automatic feeder is useful for labor saving, its attraction effect on wild boars was not quantitatively verified in this study. Instead, it was observed to have the side effect of gathering non-target animals such as birds. This implies that feeding can alter the distribution of recognition inputs around the trap and potentially increase the risk of false detections. Specifically, feeding behavior, recognition algorithms, and capture determination conditions interact with each other, making integrated design optimization essential. Therefore, the feeder should be interpreted as a labor-saving subsystem in the present validation, not as a quantitatively validated attractant mechanism. The detection area setting and temporal filtering introduced in this study are suggested to be effective in suppressing such integrated system-specific malfunction factors.
In practical wildlife capture, pre-baiting before trap activation is often used to habituate animals to the bait and trapping area [19]. In the present study, however, a controlled comparison with and without a pre-baiting period was not conducted. Therefore, the effect of pre-baiting on wild-boar entry frequency or capture efficiency cannot be quantified from the current results. Nevertheless, the automatic feeder developed in this study may be useful for implementing pre-baiting with reduced labor, because the same rice-bran bait can be supplied repeatedly before enabling the capture mechanism. Future experiments should incorporate a pre-baiting period of at least one week and compare capture-related indicators, such as trap entry frequency, full-entry events, capture opportunities, and successful captures, with and without pre-baiting.
Therefore, this study is significant in establishing a low-cost capture system capable of autonomously operating in real environments. This system integrates an automatic capture mechanism, automatic feeder, and stand-alone power supply, with edge AI recognition on a microcontroller at its core. However, the field validation should be interpreted as a proof-of-concept demonstration under the specific conditions of Gogoshima Island, rather than as a statistically complete validation of general reliability. The present results demonstrate the feasibility of autonomous capture under the tested conditions, but they do not by themselves establish seasonal robustness, long-term reliability over multiple years, or cross-regional applicability. Future validation should, therefore, focus on larger-scale field testing across multiple sites and seasons, systematic evaluation of long-term operational performance, dataset expansion for field-specific false-recognition factors, and automatic adjustment of capture conditions.

5. Conclusions

A fully automatic wild boar capture system integrating edge AI recognition, an automatic capture mechanism, an automatic feeder, and an independent power supply was developed. Field testing on Gogoshima Island confirmed the automatic capture system successfully captured 10 wild boars and demonstrated the integrated system’s ability to continuously record, feed, and manage power without external infrastructure. The solar power + LiFePO4 battery design addresses battery-life limitations seen in prior research, while the automatic feeder can reduce the labor associated with daily bait replenishment; however, its effect on wild-boar attraction and capture efficiency was not quantitatively verified in this study. Furthermore, an overhead-view dataset was introduced to address the perspective constraints and partial-intrusion issues observed in side-view camera settings. In addition, the deployed INT8 .nb model was used for field operation, but its accuracy was not systematically re-evaluated on the full validation dataset after deployment conversion. Total hardware costs were kept below approximately USD 240, demonstrating that even low-cost components can provide an effective alternative to GPU-based high-cost solutions. Future efforts will focus on deployment across multiple locations and seasons, along with introducing capture logic adapted to regional conditions. This will expand long-term wildlife damage countermeasures in island regions and areas with labor constraints.

Author Contributions

R.N.: recognition algorithm development; integrated system development using the microcontroller; field experiments; writing—original draft. F.I.B.: assistance with field experiments and data collection activities. J.H.L.: conceptualization; supervision; writing—review and editing. All authors have read and agreed to the published version of the manuscript.

Funding

This research was partially supported by JSPS KAKENHI Grant Number JP22K04012.

Institutional Review Board Statement

The field experiments were conducted using box traps that had already been permitted and managed by a local hunting association member for wildlife-damage control. The authors used these traps with the cooperation of the trap manager and did not independently install unpermitted traps. Captured wild boars were handled after capture by the authorized local hunting association member according to local wildlife-management practices. The proposed automatic capture system was designed to reduce non-target capture and injury risk by activating the trap only when target-class detections were confirmed inside the predefined decision zone for consecutive frames before relay actuation.

Data Availability Statement

The datasets used during the current study are available from the corresponding author on reasonable request.

Acknowledgments

The authors thank Kazuhito Takeda for providing the field experimental site on Gogoshima Island and for sharing information on local ecology and agricultural damage conditions. The authors also thank the laboratory members who supported the field experiments and deployments. The authors used ChatGPT (GPT-5, OpenAI) as an AI-assisted tool for English language editing and grammar improvement. The authors reviewed and edited the content and take full responsibility for the final manuscript.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Ministry of Agriculture, Forestry and Fisheries. Current Status and Countermeasures Against Wildlife Damage; MAFF: Tokyo, Japan, 2025. Available online: https://www.maff.go.jp/j/seisan/tyozyu/higai/attach/pdf/index-27.pdf (accessed on 24 February 2026).
  2. Ministry of the Environment. Reasons We Must Capture Wildlife Now; MOE: Tokyo, Japan, 2021. Available online: https://www.env.go.jp/nature/choju/docs/docs5/imatora_fin.pdf (accessed on 24 February 2026).
  3. Ministry of the Environment. On the Appearance of Wild Boars in Urban Areas; MOE: Tokyo, Japan, 2021. Available online: https://www.env.go.jp/nature/choju/conf/conf_wp/conf03-04/mat02-1.pdf (accessed on 24 February 2026).
  4. Wildlife Damage.Com. Wild Boar Control: Preventing Intrusion. 2023. Available online: https://www.choujuhigai.com/blog01/112.html (accessed on 24 February 2026).
  5. Takeyama, E.; Kanewaki, Y.; Yoshimoto, J. How Can We Build a Community-Based Capture System in an Area Where the New Distribution of Wild Animals Is Expanding? A Case Study in Nakajima Island, Ehime Prefecture, Where Wild Boars Migrated Across the Sea. J. Rural Plan. Stud. 2022, 2, 17–26. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  6. Kubota, A.; Takeyama, E.; Higashide, D.; Hamano, H.; Masamoto, Y.; Sasayama, S.; Takagi, S.; Yokoyama, M.; Kobayashi, N. The Inhabitation Status of Wild Boars on the Island 10 years after Migration Case Study of Futagami Island, Matsuyama City, Ehime Prefecture. J. Rural Plan. Stud. 2023, 3, 9–18. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  7. Arimoto, I.; Esaki, K.; Nozaki, R.; Yagami, T. Inhabiting situation of wild boar (Sus scrofa leucomystax) in SATOYAMA region and their behavior toward box trap. Ishikawa Prefect. Hakusan Nat. Conserv. Cent. Res. Rep. 2013, 40, 34–43. Available online: https://www.pref.ishikawa.lg.jp/hakusan/publish/report/documents/report40-6.pdf (accessed on 29 July 2026).
  8. Ministry of Agriculture, Forestry and Fisheries. Equipment That Can Be Used for Wildlife Damage Countermeasures; MAFF: Tokyo, Japan, 2025. Available online: https://www.maff.go.jp/j/seisan/tyozyu/higai/kikijouhou/attach/pdf/kikijouhou-96.pdf (accessed on 24 February 2026).
  9. Adaramola, M.F.; Adelabu, M.A.K. Implementation of closed-circuit television (CCTV) using wireless internet protocol (IP) camera. Innov. Syst. Des. Eng. 2017, 8, 10–19. Available online: https://www.iiste.org/Journals/index.php/ISDE/article/view/37737 (accessed on 29 July 2026).
  10. Witmer, G.W. Wildlife population monitoring: Some practical considerations. Wildl. Res. 2005, 32, 259–263. [Google Scholar] [CrossRef] [Scilit]
  11. Norouzzadeh, M.S.; Nguyen, A.; Kosmala, M.; Swanson, A.; Palmer, M.S.; Packer, C.; Clune, J. Automatically identifying, counting, and describing wild animals in camera-trap images with deep learning. Proc. Natl. Acad. Sci. USA 2018, 115, E5716–E5725. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  12. Swanson, A.; Kosmala, M.; Lintott, C.; Simpson, R.; Smith, A.; Packer, C. Snapshot Serengeti, high-frequency annotated camera trap images of 40 mammalian species in an African savanna. Sci. Data 2015, 2, 150026. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  13. Silva, L.C.; Pádua, M.B.S.; Ogusuku, L.M.; Albertini, M.K.; Pimentel, R.; Backes, A.R. Wild boar recognition using convolutional neural networks. Concurr. Comput. Pract. Exp. 2021, 33, e6010. [Google Scholar] [CrossRef] [Scilit]
  14. Schütz, A.K.; Louton, H.; Fischer, M.; Probst, C.; Gethmann, J.M.; Conraths, F.J.; Homeier-Bachmann, T. Automated detection and counting of wild boar in camera trap images. Animals 2024, 14, 1408. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  15. Guo, X.; Zhang, J.; Cao, Z.; Huang, H.; Luo, C. Improving the wild boar detection algorithm of YOLOv8n. In Proceedings of the 2024 2nd International Conference on Frontiers of Intelligent Manufacturing and Automation (CFIMA 2024), Baotou, China, 9–11 August 2024; ACM: New York, NY, USA, 2025; pp. 12–17. [Google Scholar] [CrossRef] [Scilit]
  16. Matsuoka, K.; Konoshima, M.; Eto, T.; Ota, I. Wild boar detection on sea turtle nesting beaches using camera trap images: Automated image recognition with YOLO models and their evaluation. FORMATH 2025, 24, 24.006. [Google Scholar] [CrossRef] [Scilit]
  17. Verde, M.T.; Esposito, L.; Bonavolontà, F.; Tamburis, O.; Liccardo, A.; Piscopo, N. Wild Boars’ selective capture with IoT and electronic devices solutions for innovative, sustainable and ethical management. Sensors 2025, 25, 2071. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  18. Besala, F.I.; Niimoto, R.; Lee, J.H.; Okamoto, S. Development of AI-based smart box trap system for capturing a harmful wild boar. ROBOMECH J. 2025, 12, 4. [Google Scholar] [CrossRef] [Scilit]
  19. Tamura, M.; Kirihara, Y.; Kohno, Y.; Mitani, A. Development of the self-feeder for box trap management labor saving. Bull. Ehime Prefect. Agric. For. Fish. Res. Inst. 2021, 13, 43–47. Available online: https://www.pref.ehime.jp/uploaded/attachment/26479.pdf (accessed on 29 July 2026).
  20. Ruiz-Garcia, L.; Lunadei, L.; Barreiro, P.; Robla, J.I. A review of wireless sensor technologies and applications in agriculture and food industry. Sensors 2009, 9, 4728–4750. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  21. Niimoto, R.; Besala, F.; Lee, J.H. Field test of wild boar capture system using YOLO algorithm and side-view image. In Proceedings of the 31st International Symposium on Artificial Life and Robotics (AROB 2026), Beppu, Japan, 18–20 January 2026. [Google Scholar]
  22. Realtek Semiconductor Corp. Realtek IoT/Wi-Fi MCU Solutions: AmebaPro2 Boards. Available online: https://www.amebaiot.com/en/amebapro2/ (accessed on 5 July 2026).
  23. Microsoft. Visual Object Tagging Tool (VoTT): Open-Source Annotation and Labeling Tool. 2020. Available online: https://github.com/microsoft/VoTT (accessed on 11 September 2024).
  24. Wang, C.-Y.; Bochkovskiy, A.; Liao, H.-Y.M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. arXiv 2022, arXiv:2207.02696. Available online: https://arxiv.org/abs/2207.02696 (accessed on 29 July 2026).
  25. Niimoto, R.; Besala, F.I.; Lee, J.H.; Okamoto, S. Optimization of automatic boar recognition models for microcontrollers by framework selection and quantization methods. In Proceedings of the International Conference on Mechanical Systems and Control Engineering (ICMSCE), Singapore, 21–23 November 2024; Springer Nature: Singapore, 2024; pp. 77–87. [Google Scholar]
  26. Paszke, A.; Gross, S.; Massa, F.; Lerer, A.; Bradbury, J.; Chanan, G.; Killeen, T.; Lin, Z.; Gimelshein, N.; Antiga, L.; et al. PyTorch: An imperative style, high-performance deep learning library. Adv. Neural Inf. Process. Syst. 2019, 32, 8024–8035. Available online: https://papers.nips.cc/paper_files/paper/2019/file/bdbca288fee7f92f2bfa9f7012727740-Paper.pdf (accessed on 29 July 2026).
  27. Ameba Arduino AIoT Documentation. Online AI Model Conversion Guide. Available online: https://ameba-doc-arduino-sdk.readthedocs-hosted.com/en/latest/ameba_pro2/amb82-mini/Other_Guides/AI_Related_Guides/Online%20AI%20Model%20Conversion%20Guide.html (accessed on 5 July 2026).
  28. Inohoi Online Shop. Fale-Asahi-Style Big-Size Double-Door Box Trap for Wild Boars and Deer. Available online: https://inohoi.com/products/2 (accessed on 8 July 2026).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.