Skip to content

This is a repository including a sample code for creating a custom touch detection model for a DIGIT sensor. See also: PyTouch

Notifications You must be signed in to change notification settings

tatsukamijo/DIGIT_train

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DIGIT_train

This is a repository including a sample code for creating a custom touch detection model for a DIGIT sensor.
See also: PyTouch

Requirements

It requires pytouch, digit-interface, torch, torchvision to be installed in your python.
Install with pip install if not.

Usage

1. Make a dataset

  1. Change the directory name Dxxxx to your DIGIT id in DIGIT_train/Dxxxx
  2. Change DIGIT_ID and the path to yours in make_data.py
  3. Run make_data.py to make your dataset in ./Dxxxx/touch and ./Dxxxx/notouch
    Each frame will be saved to the specified directory while running.
    Make sure to create various touching situations. To achieve this, I changed the touching situation for each set of 200 or 300 frames.

2. Train a model

Change DIGIT_ID in model.py and run it. .pth file will be saved under the ./weight directory.

3. Test the model

Change DIGIT_ID in realtime_touchdetect.py and run it.

About

This is a repository including a sample code for creating a custom touch detection model for a DIGIT sensor. See also: PyTouch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages