Giter VIP home page Giter VIP logo

csiannotator's Introduction

Installation Steps:

  1. Clone the repository & install necessary libraries:
git clone https://github.com/touhiDroid/CsiAnnotator.git
cd CsiAnnotator/
pip install -r requirements.txt
  1. Modify .env
nano .env ## Then modify the `HOST` variable to point to the CSI-Pi server
  1. Include initial data
nano data/data.json ## Update this file to contain your initial set of experiments & actions
  1. Finally, put your image files inside asset/expt directory

For Sound Playback:

sudo apt update
sudo apt-get install gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly
sudo apt-get install libqt5multimedia5-plugins

Install a Touch-screen Keyboard (Optional, but recommended):

Link: https://docs.sunfounder.com/projects/ts10-pro/en/latest/quick_guide/install_virtual.html

sudo apt install onboard
sudo apt install at-spi2-core

Then, set auto-show options & theme inside Preferences > Onboard Settings > {General, Window, Auto-show, Layout, Theme}

Run the project:

 sudo chmod +x csi_annotator.sh
 ./csi_annotator.sh

Optionally, this script can be added to the OS Menu via Preferences > Main Menu Editor, where icon and desktop shortcut can also be defined.

(Out of Project) Long click as right-click for touch-screens:

sudo apt install build-essential libevdev2 libevdev-dev
git clone 'https://github.com/PeterCxy/evdev-right-click-emulation.git'
cd 'evdev-right-click-emulation'

This codebase has a bug in the Makefile. So, change the Makefile to this one:

CC := gcc
XFLAGS := -Wall -std=c11 -D_POSIX_C_SOURCE=199309L
LIBRARIES := -levdev
INCLUDES := -I/usr/include/libevdev-1.0
CFLAGS := $(XFLAGS) $(INCLUDES)

OUTDIR := out
SOURCES := uinput.c input.c rce.c
OBJS := $(SOURCES:%.c=$(OUTDIR)/%.o)
TARGET := $(OUTDIR)/evdev-rce

.PHONY: all clean

$(OUTDIR)/%.o: %.c
	@mkdir -p $(OUTDIR)
	$(CC) $(CFLAGS) -c $< -o $@

$(TARGET): $(OBJS)
	$(CC) $(CFLAGS) $^ $(LIBRARIES) -o $@

all: $(TARGET)
clean:
	rm -rf $(OUTDIR)

Then continue building and

make all
sudo cp 'out/evdev-rce' '/usr/local/bin/'
sudo chmod +x '/usr/local/bin/evdev-rce'
# Run evdev-rce as normal user
sudo usermod -G 'input' -a pi
echo 'uinput' | sudo tee -a /etc/modules
sudo nano /etc/udev/rules.d/99-uinput.rules
# Then put this line(within backticks): `KERNEL=="uinput", MODE="0660", GROUP="input"`
sudo udevadm control --reload-rules
sudo udevadm trigger
cd
mkdir -p "$HOME/.config/autostart"
nano "$HOME/.config/autostart/evdev-rce.desktop"

Then, put this as the desktop entry:

[Desktop Entry]
Version=1.0
Type=Application
Name=evdev-rce
GenericName=Enable long-press-to-right-click gesture
Exec=env LONG_CLICK_INTERVAL=500 LONG_CLICK_FUZZ=50 /usr/local/bin/evdev-rce
Terminal=true
StartupNotify=false

csiannotator's People

Contributors

touhidroid avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.