|
| 1 | +# **Shift Experiment Generator User Guide** |
| 2 | + |
| 3 | +This tool is a Graphical User Interface (GUI) designed to help you construct complex command-line arguments for the `shift_experiment.py` script in the [Distribution Shift Perception Tool](https://github.com/hafeezkhan909/Distribution-Shift-Lane-Perception). It is used for configuring experiments related to **Distribution Shift Lane Perception** without needing to memorize CLI flags. |
| 4 | + |
| 5 | +> ## [Click Here](https://suave101.github.io/Distribution-Shift-Lane-Perception-Command-Generator/) to go to the webpage |
| 6 | +
|
| 7 | +## **1. Interface Overview** |
| 8 | + |
| 9 | +The interface is divided into two main areas: |
| 10 | + |
| 11 | + * **Left Column:** The Configuration Panel where you input your experiment parameters. |
| 12 | + * **Right Column (Sticky):** The Command Output. This updates in real-time as you modify settings on the left. |
| 13 | + |
| 14 | +----- |
| 15 | + |
| 16 | +## **2. Step-by-Step Configuration** |
| 17 | + |
| 18 | +### **A. Dataset Configuration** |
| 19 | + |
| 20 | +This section defines where your data lives and which lists define your train/test splits. |
| 21 | + |
| 22 | + * **Source Directory:** The root folder for your training/source images (Default: `./datasets/CULane`). |
| 23 | + * **Target Directory:** The root folder for your testing/shifted images (Default: `./datasets/Curvelanes`). |
| 24 | + * **List Paths:** Point these to the text files containing the relative paths of the images for the source and target datasets respectively. |
| 25 | + |
| 26 | +### **B. Sampling & Model Settings** |
| 27 | + |
| 28 | +Configure the scope and hyperparameters of the experiment. |
| 29 | + |
| 30 | + * **Sample Counts:** Set how many images to sample from the Source (`--src_samples`) and Target (`--tgt_samples`) datasets. |
| 31 | + * **Runs & Calibration:** \* **Num Runs:** How many times to repeat the experiment for statistical significance. |
| 32 | + * **Calibration Runs:** The number of runs dedicated to calibrating the uncertainty quantification. |
| 33 | + * **Hyperparameters:** |
| 34 | + * **Alpha:** Significance level (e.g., 0.05 for 95% confidence). |
| 35 | + * **Image Size/Batch Size:** Adjust according to your GPU memory constraints. |
| 36 | + * **Crop Image:** Check this box to append the `--cropImg` flag (useful if the model expects cropped regions of interest). |
| 37 | + |
| 38 | +### **C. Synthetic Shift Configuration** |
| 39 | + |
| 40 | +This is the core feature for testing robustness against distribution shifts. |
| 41 | + |
| 42 | +1. **Select Shift Type:** Use the dropdown menu to select the type of shift. |
| 43 | + |
| 44 | + * **None (Cross-Domain Mode):** Runs the experiment purely between Source and Target datasets without adding synthetic noise. |
| 45 | + * **Synthetic Options:** Gaussian Noise, Rotation, Translation, Shear, Zoom, Horizontal/Vertical Flips. |
| 46 | + |
| 47 | +2. **Adjust Shift Parameters:** |
| 48 | + |
| 49 | + * *Note:* Specific input fields will appear based on your selection. |
| 50 | + * **Example:** If you select **Rotation**, a "Rotation Angle" input appears. If you select **Gaussian**, a "Standard Deviation" input appears. |
| 51 | + |
| 52 | +### **D. Logging** |
| 53 | + |
| 54 | + * **Log Directory:** Folder where results will be saved (Default: `logs`). |
| 55 | + * **Filename:** The name of the JSON file where metrics are recorded (Default: `sanity_check.json`). |
| 56 | + |
| 57 | +----- |
| 58 | + |
| 59 | +## **3. Generating & Running the Command** |
| 60 | + |
| 61 | +Once your configuration is set: |
| 62 | + |
| 63 | +1. Look at the **Generated Command** card on the right side of the screen. |
| 64 | +2. Click the **Copy Command** button. ( The button will turn green and say "Copied\!" to confirm). |
| 65 | +3. Open your terminal or command prompt. |
| 66 | +4. Navigate to the directory containing `shift_experiment.py`. |
| 67 | +5. Paste the command and hit **Enter**. |
| 68 | + |
| 69 | +**Example Output:** |
| 70 | + |
| 71 | +```bash |
| 72 | +python shift_experiment.py \ |
| 73 | + --source_dir ./datasets/CULane \ |
| 74 | + --target_dir ./datasets/Curvelanes \ |
| 75 | + --shift rotation_shift \ |
| 76 | + --rotation_angle 15.0 \ |
| 77 | + --file_name my_experiment.json |
| 78 | +``` |
| 79 | + |
| 80 | +----- |
| 81 | + |
| 82 | +## **4. Troubleshooting** |
| 83 | + |
| 84 | + * **Command Box Empty/Wrong:** Ensure you haven't left required numeric fields blank. The tool uses default values from the HTML if you don't touch them, but deleting a value manually might result in a missing flag. |
| 85 | + * **Copy Button not working:** Ensure your browser allows clipboard access. You can manually highlight the text in the black box and press `Ctrl+C` (Windows) or `Cmd+C` (Mac). |
| 86 | + |
| 87 | +----- |
0 commit comments