Skip to content

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

Notifications You must be signed in to change notification settings

jlgarridol/FIS-FBIS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published