Code for "Propeller Damage Detection: Adapting Models to Diverse UAV Sizes" Submitted to IEEE Robotics and Automation Letters.
This manuscript introduces a transfer learning method for adapting propeller fault detection neural networks to different unmanned aerial vehicles (UAVs). After training a simple model for detecting if any propeller in a specific vehicle has a failure (in this case, a chipped tip), a domain adaptation based in the vehicles' physics is performed in order to use the same model to detect failures in vehicles with different structures, weights, or motor-propeller sets. A key feature is that the detection model uses only inertial sensors that are standard in commercial UAVs, making it broadly applicable without the need for additional hardware.
https://www.youtube.com/watch?v=MXNc1VfQ0Y8
-
Clone this repository.
-
Install Python3 dependencies,
matplotlib,numpy,pytorch,scikit-learn,scipy,seaborn,torch,lightning,tqdm -
Run
model_train.pywith the following configuration for each experiment:
Use the quadcarbono_datamodule inside model_train.py
data_module = quadcarbono_datamoduleUse the affine_datamodule inside model_train.py
affine_datamodule = affine_DataModule(
source_path="data/garage_manual/",
target_path="data/quadcarbono/",
source_fs=222,
target_fs=222,
)
data_module = affine_datamoduleFor the naive use no scaling, set self.scale_factor = 1.0 inside affine.py
For the scaled experiment, set self.scale_factor = 0.734 inside affine.py
For this experiment use the data in quadcarbono_weight_shift as test instead of Hasymm164_inertial
Use the affine_datamodule inside model_train.py
affine_datamodule = affine_DataModule(
source_path="data/quadcarbono/",
target_path="data/quadcarbono_1000/",
source_fs=222,
target_fs=222,
)
data_module = affine_datamoduleFor the naive use no scaling, set self.scale_factor = 1.0 inside affine.py
For the scaled experiment, set self.scale_factor = 1.12 inside affine.py
For this experiment use quadcarbono_water as test
affine_datamodule = affine_DataModule(
source_path="data/quadcarbono/",
target_path="data/hexaF550/",
source_fs=222,
target_fs=222,
)
data_module = affine_datamodule