Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c9ab3ee
image stitching update for slam map gen
linpeiyu164 Apr 10, 2026
7621602
mv image stitching into gui.py
Apr 10, 2026
dd78c0b
fix bugs and integrate with gui.py
Apr 10, 2026
3eceb61
Add SLAM tiling alignment marker detection for all layers
racheljiang310 Apr 9, 2026
0c6c6a1
some random person said this is neccessary for me to upload large files
racheljiang310 Apr 10, 2026
1242d2c
Add model weights
racheljiang310 Apr 10, 2026
93a792f
Merge pull request #40 from hacker-fab/feat/new_alignment_model
racheljiang310 Apr 10, 2026
a4e6ddb
add fallback dx, dy when alignment fails
Apr 14, 2026
7a83d7a
added basic functions + validated in colab
Apr 11, 2026
b23d20f
big fixes, organization, and updates to MapFrame
racheljiang310 Apr 16, 2026
1f6cbbb
fix: stage step incorrect
linpeiyu164 Apr 17, 2026
7d9c969
wth logs
Apr 17, 2026
f915114
fix bug: y positive different between canvas and stage
Apr 19, 2026
ce56490
add event to indicate stitch complete
linpeiyu164 Apr 18, 2026
e16815b
add upload frame for previous layer pattern upload
linpeiyu164 Apr 19, 2026
5c62848
wip multilayer alignment integration
linpeiyu164 Apr 20, 2026
c816378
tiling is in business!
Apr 19, 2026
442b3b8
cleaned code, sped up alignment, enhanced alignment
racheljiang310 Apr 22, 2026
69b7ad4
fix: flip capture and stitch result before using
linpeiyu164 Apr 26, 2026
41858cb
add yolo model updates
linpeiyu164 Apr 26, 2026
1487603
add multilayer logic
linpeiyu164 Apr 26, 2026
9f93f8b
Merge remote-tracking branch 'origin/feature/align_stiched_to_digital…
racheljiang310 Apr 26, 2026
b8dc15b
add comments
racheljiang310 Apr 26, 2026
a4e201b
remove unused helper functions
racheljiang310 Apr 26, 2026
a483cec
fix: multilayer related bug fixes
Apr 26, 2026
d81cf3d
add extract rectangle logic for cap & stitch
linpeiyu164 Apr 27, 2026
cd3bda0
fix bug
Apr 27, 2026
3b50fbf
fix bug and update capture and stitch
Apr 27, 2026
734b180
fix merge errors
linpeiyu164 Apr 27, 2026
7bf0d33
fix: move to upper left corner after detecting alignment markers for …
linpeiyu164 Apr 27, 2026
35387a3
Merge branch 'feat/new_alignment_algorithm' of https://github.com/hac…
linpeiyu164 Apr 27, 2026
f51e4d8
adjust image rotation based on transform
linpeiyu164 Apr 28, 2026
485db51
fix bug
linpeiyu164 Apr 28, 2026
cb0b2bf
Merge pull request #42 from hacker-fab/feat/new_alignment_algorithm
racheljiang310 May 12, 2026
8504b06
remove clutter + migrate code to dedicated files
racheljiang310 May 12, 2026
eff103b
scrollable GUI
racheljiang310 May 15, 2026
d68adb3
remove clutter + migrate code to dedicated files
racheljiang310 May 12, 2026
0fc6e7b
Merge branch 'splitting-massive-file' of https://github.com/hacker-fa…
racheljiang310 May 15, 2026
62d3294
fixed bugs while testing
racheljiang310 May 15, 2026
e54fa15
Merge pull request #44 from hacker-fab/splitting-massive-file
racheljiang310 May 15, 2026
2e71d2f
debugging and validating
racheljiang310 May 15, 2026
29b2e99
debugging and validating
racheljiang310 May 15, 2026
c7c47a2
Merge branch 'feat/multi-layer-tiling' of https://github.com/hacker-f…
racheljiang310 May 15, 2026
ce7d161
fixes
linpeiyu164 May 15, 2026
624fb16
plz work
racheljiang310 May 26, 2026
7502ac8
Merge pull request #45 from hacker-fab/hotfix
racheljiang310 May 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.onnx filter=lfs diff=lfs merge=lfs -text
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
!assets/*.jpeg
*.mp4
*.mp3
*data_collection*

# configuration
*.toml
Expand All @@ -31,4 +32,4 @@ venvcompat
venv/
**/__pycache__

stepper_captures
stepper_captures
40 changes: 36 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,18 @@ Enable homing (if you have sensors).
$22=1
```

Ensure that positions are given as `WPos` instead of `MPos`. This allows
us to set a (0,0,0) starting point for within grbl itself. Note that this
is optional, but highly recommened, as it's easier to read coordinates
from grbl this way.

Adjust the homing direction invert mask (if you have sensors).
Bits 0, 1, and 2 in this value correspond to the X, Y, and Z axes.
For each axis, check if the limit switch is reached by moving in the positive direction or the negative direction.
If the axis requires negative movement, set the corresponding bit.
On CMU's setup, the limit switches are all reached by traveling in the negative direction,
so we use a value of 7 (invert all axes).
so we use a value of 7 (invert all axes). However this value may change
depending on how you also configure setting `$3`.

```
$23=7
Expand Down Expand Up @@ -148,6 +154,23 @@ python --version # ensure version is correct (<=3.10)
pip install -r requirements.txt
```

## Loading Alignment Markers (RF_DETR model)

Due to file size constraints in GitHub, the actual file for the RF_DETR weights (`weights.onnx`) are not stored
in this repository, and are instead replaced by a pointer file on a large file system in git (Git LFS)
In order to extract that file, you have two options:

```bash
git lfs install
git clone https://github.com/hacker-fab/stepper
git lfs pull
```

> If you already cloned without LFS, you can just run `git lfs pull` to fetch the weights, no need to run the second line.

Alternatively, you may fetch the real file [here](https://github.com/hacker-fab/stepper_attachments/tree/main/model) and replace the current `weights.onnx` file with the one downloaded from the link.


### Using a Basler (Pylon) camera

To use a Basler camera with the GUI, you will need to install `pylon` from
Expand Down Expand Up @@ -220,9 +243,13 @@ uv-exposure = 25000.0
enabled = true
# Set homing to false if your stage does not have limit sensors
homing = false

# The following features can be enabled when homing is set to true. Note that this assumes the stage
# won't be moved manually, but entirely through the gui

# Enable tiling if user wishes to use tiling features
tiling = false
# Set autofocus offset, requires homing to be true. Set 0 for no autofocus
# Set autofocus offset to get an estimated focus position for the z-stage. Set 0 to use the original autofocus algorithm
autofocus = 0


Expand All @@ -236,8 +263,13 @@ baud-rate = 115200
[alignment]
# Enable or disable real-time detection of alignment markers
enabled = false
# Path to the YOLO model weights file
model_path = "best.pt"
# Path to the alignment model weights file
# The following paths are supported: "ckpts/best.pt" and "ckpts/weights.onnx"
# The key difference between the two are that best.pt runs a YOLO model trained on developed
# images while weights.onnx runs on RF-DETR, which is trained on both developed and latent images
# that suite it for the tiling feature for the stepper
model_path = "ckpts/best.pt"

# Alignment marker reference coordinates (in pixels)
right_marker_x = 1634.0 # x-coordinate for markers on the right side
top_marker_y = 117.5 # y-coordinate for markers on the top
Expand Down
3 changes: 3 additions & 0 deletions ckpts/weights.onnx
Git LFS file not shown
18 changes: 14 additions & 4 deletions default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,21 @@ uv-exposure = 25000.0
[stage]
# Set enabled to false to disable all motion.
enabled = true

# Set homing to false if your stage does not have limit sensors
homing = false

# The following features can be enabled when homing
# is set to true. Note that this assumes the stage
# won't be moved manually, but entirely through the gui

# Enable tiling if user wishes to use tiling features
tiling = false

# Set autofocus offset, requires homing to be true. Set 0 for no autofocus
# Set autofocus offset to get an estimated focus position
# for the z-stage. Set 0 to use the original autofocus
# algorithm, which may take more time to run.
autofocus = 0


# Select the correct serial port for the device running GRBL.
# The correct serial port can be checked with Device Manager on Windows.
port = "COM6"
Expand All @@ -46,8 +51,13 @@ z-max = -1
[alignment]
# Enable or disable real-time detection of alignment markers
enabled = false
# Path to the YOLO model weights file
# Path to the alignment model weights file
# The following paths are supported: "ckpts/best.pt" and "ckpts/weights.onnx"
# The key difference between the two are that best.pt runs a YOLO model trained on developed
# images while weights.onnx runs on RF-DETR, which is trained on both developed and latent images
# that suite it for the tiling feature for the stepper
model_path = "ckpts/best.pt"

# Alignment marker reference coordinates (in pixels)
right_marker_x = 1820.0 # x-coordinate for markers on the right side
top_marker_y = 269.0 # y-coordinate for markers on the top
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ dependencies = [
"pyserial>=3.5",
"toml>=0.10.2",
"ultralytics>=8.3.218",
"onnxruntime>=1.19.0,<1.22.0",
"screeninfo>=0.8.1",
]

[tool.uv.sources]
Expand Down
Loading