Spaces:
Runtime error
Runtime error
Add comprehensive step-by-step Phyphox recording guide
Browse files- src/phyphox_app_block.py +35 -9
src/phyphox_app_block.py
CHANGED
|
@@ -64,15 +64,41 @@ def render_phyphox_tab(
|
|
| 64 |
norm_params_path: str,
|
| 65 |
) -> None:
|
| 66 |
st.subheader("Upload Phyphox sensor recording")
|
| 67 |
-
st.
|
| 68 |
-
|
| 69 |
-
1
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
if "phyphox_run" not in st.session_state:
|
| 78 |
st.session_state.phyphox_run = 0
|
|
|
|
| 64 |
norm_params_path: str,
|
| 65 |
) -> None:
|
| 66 |
st.subheader("Upload Phyphox sensor recording")
|
| 67 |
+
with st.expander("How to record and export your data โ step by step", expanded=True):
|
| 68 |
+
st.markdown("""
|
| 69 |
+
**Step 1 โ Install Phyphox**
|
| 70 |
+
Download the free [Phyphox](https://phyphox.org/) app from the Play Store (Android) or App Store (iOS).
|
| 71 |
+
|
| 72 |
+
**Step 2 โ Create a new experiment**
|
| 73 |
+
- Open the app and tap the **+** icon in the top-right corner
|
| 74 |
+
- Select **Add simple experiment**
|
| 75 |
+
- In the active sensors list, add **Accelerometer** and **Gyroscope**
|
| 76 |
+
- Set the **sensor rate to 50** (Hz) for both
|
| 77 |
+
- Give the experiment a title (e.g. "Walking") then tap **Proceed**
|
| 78 |
+
|
| 79 |
+
**Step 3 โ Configure a timed run**
|
| 80 |
+
- Tap the **โฎ (three-dot menu)** in the top-right corner and select **Timed run**
|
| 81 |
+
- Set a **recording duration** (15โ20 seconds recommended)
|
| 82 |
+
- Optionally set a **start delay** (e.g. 5 seconds) so you have time to get into position before recording begins
|
| 83 |
+
|
| 84 |
+
**Step 4 โ Position the device**
|
| 85 |
+
Place your phone in your **trouser pocket** or attach it at your **waist**. This mirrors how the original UCI dataset was collected and gives the most accurate results.
|
| 86 |
+
|
| 87 |
+
**Step 5 โ Record one activity**
|
| 88 |
+
- Press the **play button** to start
|
| 89 |
+
- Perform a **single activity continuously** โ do not stop and restart mid-recording
|
| 90 |
+
- Stay in steady motion for the full duration before stopping
|
| 91 |
+
|
| 92 |
+
**Step 6 โ Export the data**
|
| 93 |
+
- After the recording ends, tap the **โฎ (three-dot menu)** and select **Export data**
|
| 94 |
+
- Choose **CSV (comma separated values)** and confirm
|
| 95 |
+
- You will receive a **.zip file** โ unzip it to find separate CSV files for the **Accelerometer** and **Gyroscope**
|
| 96 |
+
|
| 97 |
+
**Step 7 โ Upload below**
|
| 98 |
+
Upload each CSV file into its corresponding field below, then the pipeline will extract features and classify your activity.
|
| 99 |
+
|
| 100 |
+
> โ ๏ธ **Important:** Each export is a fresh experiment. Do not reuse an old experiment โ it will contain data from previous recordings stitched together, which will confuse the classifier.
|
| 101 |
+
""")
|
| 102 |
|
| 103 |
if "phyphox_run" not in st.session_state:
|
| 104 |
st.session_state.phyphox_run = 0
|