Contact Us
CiiS Lab
Johns Hopkins University
112 Hackerman Hall
3400 N. Charles Street
Baltimore, MD 21218
Directions
Lab Director
Russell Taylor
127 Hackerman Hall
rht@jhu.edu
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| courses:456:2023:projects:456-2023-16:project-16 [2023/05/11 11:03] – [Dependencies] zzhan270 | courses:456:2023:projects:456-2023-16:project-16 [2023/05/11 13:09] (current) – [Reports and presentations] wli131 | ||
|---|---|---|---|
| Line 50: | Line 50: | ||
| Angle Controller with PID and the RoboClaw Controller | Angle Controller with PID and the RoboClaw Controller | ||
| - | {{: | + | The purpose of implementing a Proportional-Integral-Derivative (PID) controller in conjunction with the RoboClaw Package was to control the motor' |
| + | |||
| + | {{: | ||
| Integration with the Computer Vision System and the Motor Control | Integration with the Computer Vision System and the Motor Control | ||
| + | |||
| + | During the experimentation phase, the PID control sometimes required a longer execution time. However, given the necessity to collect a large volume of data, often in the thousands, we developed a conditional program to optimize the process. This program assessed whether the encoder readings had reached the target value, and upon achieving the desired value, the system would exit the PID control loop and proceed directly to the computer vision algorithm. This approach significantly improved the efficiency of the data collection process. | ||
| {{: | {{: | ||
| Line 59: | Line 63: | ||
| Dual-Camera Calibration | Dual-Camera Calibration | ||
| + | |||
| + | Dual-camera calibration is the process of determining the relative positions and orientations of two cameras with respect to each other. These parameters are used to transform the 2D image coordinates into 3D world coordinates through point cloud registration, | ||
| {{: | {{: | ||
| Data Generation for training | Data Generation for training | ||
| + | |||
| + | The data is generated using the Shape from Silhouette (SfS) algorithm, processing binary images from top and side cameras to obtain strip-like clusters representing the wire's 3D configuration. Gaussian Mixture Model clustering is applied to isolate the data and find the mean point of each cluster, while Silhouette Analysis, Akaike Information Criterion (AIC), and Bayesian Information Criterion (BIC) help determine the optimal number of clusters. Despite some contradictions, | ||
| {{: | {{: | ||
| Line 70: | Line 78: | ||
| Data Collection and Preprocessing | Data Collection and Preprocessing | ||
| + | To develop the forward kinematics mapping for the Nitinol soft robot manipulator, | ||
| + | |||
| + | The input and output data were loaded and preprocessed by dividing them into training and validation sets (80% for training and 20% for validation, accounting for 3/4 of the total data), while also reserving 1/4 of the rest of data as a test dataset to evaluate prediction performance. The input data were standardized using the StandardScaler from the scikit-learn library. The output data were reshaped and standardized in a similar manner. | ||
| {{: | {{: | ||
| Overview of Deep Learning Model | Overview of Deep Learning Model | ||
| + | |||
| + | The MLP model was trained using the mean squared error (MSE) loss function and the Adam optimization algorithm, employing a custom learning rate of 1e-5. The model underwent training for 500 epochs with a batch size of 30. The training process consisted of forward and backward passes, updating the model' | ||
| + | |||
| + | Throughout the training, the loss metrics, such as mean squared error, mean absolute error, and R-squared score, were computed and recorded for both the training and validation sets. These metrics were utilized to evaluate the model' | ||
| {{: | {{: | ||
| Line 79: | Line 94: | ||
| Overview of Tansfer Learning | Overview of Tansfer Learning | ||
| + | |||
| + | Transfer learning is a machine learning technique where a pre-trained model is used as the starting point for training a new model on a different task, as shown in Figure. The concept behind transfer learning is that the knowledge gained by a pre-trained model on one task can be useful in solving a related task. Instead of starting from scratch, the pre-trained model provides a foundation of knowledge that can be built upon and adapted to the new task. | ||
| {{: | {{: | ||
| Line 84: | Line 101: | ||
| ======Dependencies====== | ======Dependencies====== | ||
| - | {{: | + | {{: |
| ======Timeline and Milestones of the Project ====== | ======Timeline and Milestones of the Project ====== | ||
| **Timeline** | **Timeline** | ||
| Line 96: | Line 113: | ||
| ======Experiment and Test====== | ======Experiment and Test====== | ||
| **Test Station Set** | **Test Station Set** | ||
| + | |||
| + | Experimental testing was performed as follows. First we connected the motor to the Arduino board using a suitable motor driver circuit and digital pins. To measure the motor' | ||
| {{: | {{: | ||
| **Different Wire Setting for Transfer Learning and Deep Learning** | **Different Wire Setting for Transfer Learning and Deep Learning** | ||
| + | |||
| + | he experiment involved manufacturing five distinct Nitinol wires and collecting data for each of them. Specifically, | ||
| + | |||
| + | To prepare the wire for experimental data collection, additional processing steps are necessary. First, the radius of the end crossing of the CWM is controlled through a plastic sealing technique. Subsequently, | ||
| {{: | {{: | ||
| Line 105: | Line 128: | ||
| ======Result====== | ======Result====== | ||
| - | Comparison between Learned and Real Dat | + | **Comparison between Learned and Real Data** |
| + | |||
| + | We present a visualization of the real-world wire shape alongside the predicted wire shape. The red lines represent the predictions, | ||
| {{: | {{: | ||
| - | Comparison of MAE for Transfer Learning in Different Fine-tuning Datasets with Measurement Precision in mm | + | **Comparison of MAE for Transfer Learning in Different Fine-tuning Datasets with Measurement Precision in mm** |
| + | |||
| + | The results of our transfer learning experiments are presented in Table, which compares the errors obtained when training from scratch and when using pre-training followed by fine-tuning for different data samples used as fine-tuning datasets. The table highlights the substantial improvements achieved through transfer learning. From the table, it is evident that the pre-training and fine-tuning process significantly reduces the error compared to training from scratch. The table is divided into two main categories: models trained from scratch and models that underwent a pre-training and fine-tuning process. The columns represent the size of the fine-tuning datasets, including one sample, five samples, and seven samples. | ||
| + | |||
| + | For the models trained from scratch, the MAE values are significantly higher, ranging from 122.248 mm with one sample to 61.793 mm with seven samples. This indicates that without pre-training, | ||
| + | |||
| + | On the other hand, the pre-training and fine-tuning approach demonstrates substantially lower MAE values across all fine-tuning dataset sizes. For one sample, the MAE is 27.255 mm, while for five samples, it is 21.143 mm, and for seven samples, it is 20.789 mm. These results highlight the effectiveness of transfer learning in improving model performance, | ||
| {{: | {{: | ||
| Line 133: | Line 164: | ||
| * Project Final Report | * Project Final Report | ||
| * {{: | * {{: | ||
| - | * links to any appendices or other material | + | * {{ : |
| ======Project Bibliography======= | ======Project Bibliography======= | ||
| Grassmann, R.M., & Burgner-Kahrs, | Grassmann, R.M., & Burgner-Kahrs, | ||