Coder Social home page Coder Social logo

jlgarridol / fis-fbis Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 122.92 MB

Repository of the FIS project PI19/00670: Feasibility and cost-effectiveness study of the use of telemedicine is being developed with a multidisciplinary team for the prevention of falls in Parkinson's disease

License: GNU General Public License v3.0

Dockerfile 0.01% Shell 0.01% Python 0.08% Jupyter Notebook 99.43% CSS 0.01% JavaScript 0.40% HTML 0.06%

fis-fbis's Introduction

Project FIS PI19/00670

made-with-python run-on-docker GitHub repo size GitHub Maintenance

Repository of the software for the project FIS PI19/00670 "Feasibility and cost-effectiveness study of the use of telemedicine is being developed with a multidisciplinary team for the prevention of falls in Parkinson's disease" of the Spanish Government.

Developed by Jose-Luis Garrido-Labrador and Jose-Miguel Ramírez-Sanz, supervised by Dr. Álvar Arnaiz-González and Dr. José-Francisco Díez-Pastor. Project PI: M.D. Esther Cubo.

Abstract

During the last decades tele-rehabilitation has been consolidated as a solution for many diseases because of, mainly, its good results, its reduction of costs, and the possibility of reaching remote places. In addition, the intrinsic distance of tele-medicine eliminates the exposure of vulnerable patients to unnecessary risks. One of the problems of tele-rehabilitation is the need of a professional for assessing the proper performance of the exercises, which reduces one of its advantages, that is, the cost cutting. This paper focuses on a low-cost tele-rehabilitation system for patients that suffer from Parkinson disease in remote villages or inaccessible places. The paper presents a full-stack, using Big Data frameworks, that makes possible the communication between the patient and the occupational therapist, the recording of the sessions, and seeks the automatic evaluation of the exercises by using Artificial Intelligence techniques. To ingest the huge amount of videos that simultaneous patients could produce, Big Data technologies were used. Moreover, the use of deep neural networks makes possible the proper identification of the patients' skeleton which would allow automatic evaluation of the exercises helping to the therapist in his or her tasks. The system is being currently applied in Spain, more specifically in the province of Burgos, in the framework of a national project for evaluating the use of a multidisciplinary tele-rehabilitation fall prevention program.

Cite this software as:

in progress

Output examples

Deploy

All commands must be executed in folder "src/scripts/deploy/".

  1. Build docker images

First it is necessary to build the docker images.

$ docker build -f ../../dockers/fishubu/base/Dockerfile -t fishubu-base:1.0.0 ../../
$ docker build -f../../dockers/fishubu/enviroment/Dockerfile -t fishubu-env:1.0.0 ../../
$ docker build ../../dockers/spark/base -t spark-base-fis:2.4.5
$ docker build ../../dockers/spark/master -t spark-master-fis:2.4.5
$ docker build ../../dockers/spark/worker -tspark-worker-fis:2.4.5
  1. Start the server

To support the tele-rehabilitation system it is necessary to start the service of Kafka and Spark.

$ ./start-server <output> <n. of cpu for master> <n. of workers > <n. of cpu for workers> <memory per workers>
  1. Create a new stream

For each tele-rehabilitation a new stream has to be created.

$ ./new-stream "parameters to emitter.py (keep blank in explotation)" "parameters to consumer.py"

This command returns by STDOUT the identifier of the stream. It is necessary to save it to close the stream.

See Manual creation for parameters of emitter.py and for consumer.py.

  1. Close a stream

When tele-rehabilitation has finished, the stream must be closed to release the machine's resources.

$ ./stop-stream ,stream identifier>
  1. Close the server

The server must be securely closed. The following command is used to ensure properly shutdown.

$ ./stop-server

Manual creation

The following Python scripts take care of the enqueue and processing of the video stream.

  1. emitter.py

Script for sending frames to an UDP server. Necessary for pre-recorded videos.

Syntax:
	emitter.py --ip=localhost --port=12345 --file=video.webm
-----------------------------------------------------------
Communication parameters
	--ip=<Ip of UDP broadcast> 
		(Default: localhost)
	--port=<Port of UDP broadcast>
	--file=<Video source>
	
Stream management parameters
    --resize=<Proportion> 
    	(Default: 1.0)
    -f <FPS> | --fps=<FPS> 
    	(Default: 10) frame rate of the video to be broadcast
  1. consumer.py

Script for parallel frame processing.

Syntax
	consumer.py --ip=localhost --port=12345 --topic=queue 
-----------------------------------------------------------
Communication parameters
	--output==<Output folder or stream> 
		(Default: output)
	--sparkhost=<Spark host>
		(Default: local)
	--kafkahost=<Kafka host> 
		(Default: localhost:9092)
	--topic=<Kafka topic> 
		(Default: video-stream-event)

Stream management parameters
	-a -> Anonymize faces, by default pixelated
		-g <Factor> | --blur=<Factor>
			(Default: 3) Blur anonymizing
		-p <Factor> | --pixel=<Factor>
			(Default: 15) Pixel anonymizing
	-b -> Auto brightness adjustment
	-c -> Auto contrast adjustment
	-f <FPS> | --fps=<FPS> 
    	(Default: 10) frame rate of the video to be broadcast
	--no-save -> Don't save frames
  1. producer.py

Script for the frame enqueue in Kafka.

Syntax
	producer.py --ip=localhost --port=12345 --topic=queue 
-----------------------------------------------------------
Communication parameters
	--ip=<Ip of UDP broadcast> 
		(Default: localhost)
	--port=<Port of UDP broadcast>
	--kafkahost=<Kafka host> 
		(Default: localhost:9092)
	--topic=<Kafka topic> 
		(Default: video-stream-event)

Third party

List of the libraries used grouped by licence.

Apache 2.0

GPLv3

BSD and variants

  • Caffe from Berkeley Vision and Learning Center
  • Flask from The Pallets Projects
  • Jinja from The Pallets Projects
  • OpenCV from Intel Corporation, Xperience AI
  • Seaborn from Michael Waskom

MIT

fis-fbis's People

Contributors

jlgarridol avatar alvarag avatar

Watchers

 avatar  avatar

Forkers

admirable-ubu

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.