Human-like cursor movement generator using a self-trained ONNX model. Simulates real mouse trajectories for testing, UI automation, or research.
Generates intermediate points between a start X,Y and end X,Y. Useful against anti-bots for automation.
I trained this late 2023 on a dataset of my own cursor movement. If I come across the data, I will add here.
Video demonstrating the data collection interface, with the trained model automating the clicks (https://www.youtube.com/watch?v=eyEzAjEbgxI)
demo.mp4
There are two separate projects.
TrajectoryGeneratorAPI is an API implementation, which can be tested here: https://jsnell.dev/trajectory/
curl -s -L -X POST 'https://jsnell.dev/api/generate' ^
-H 'Content-Type: application/json' ^
-d '{
"start": [
903,
629
],
"end": [
1021,
726
],
"points": 15,
"randomness": 1
}'
// Response
{
"points": [
[
903,
629
],
[
889,
622
],
...
[
1021,
726
]
]
}
HumanizedTrajectoryGen is a very basic CLI example:
Enter nothing for randomized data:
Enter start point (x,y):
No input provided. Generating random coordinates: 162,584
Enter end point (x,y):
No input provided. Generating random coordinates: 1396,9
Enter randomness factor (optional, default: 1.5): (Default: 1.5)
Invalid input. Please enter a number.
Enter density (optional, default: 5): (Default: 5)
Value must be at least 1. Using default.
Trajectory:
[[162,584],[164,584],[167,584],[170,584],[173,583],..]
Image saved successfully to output\output-01-56-09.png
