victor369basu / Respiratory-diseases-recognition-through-respiratory-sound-with-the-help-of-deep-neural-network

Prediction of respiratory diseases such as COPD(Chronic obstructive pulmonary disease), URTI(upper respiratory tract infection), Bronchiectasis, Pneumonia, Bronchiolitis with the help of deep neural networks or deep learning. We have constructed a deep neural network model that takes in respiratory sound as input and classifies the condition of its respiratory system. It not only classifies among the above-mentioned disease but also classifies if a person’s respiratory system is healthy or not with higher accuracy and precision.
38 stars 9 forks source link

input shape for GRU model #1

Open Cybernorse opened 3 years ago

Cybernorse commented 3 years ago

Good day Victor, i was reproducing this deep neural network with GRU code as i followed your research methodology for classifying respiratory diseases based on audio samples (ICBHI), since you did not provide the code for reshaping the dataset to the required input shape format (which is - None, 1, 40) i am having trouble reshaping the dataset for input as i have tried different ways. Could you please share that code or provide any guidance on how i can do that ? Thank you very much.

victor369basu commented 3 years ago

data_x, sampling_rate = librosa.load(dir_+soundDir,res_type='kaiser_fast') mfccs = np.mean(librosa.feature.mfcc(y=data_x, sr=sampling_rate, n_mfcc=40).T,axis=0)

victor369basu commented 3 years ago

A lot of things in Keras has changed since 2019. Now it's tf.keras( tensorflow ) not Keras as a library. you need to change a lot in this code wrt to the current tensorflow keras, although the architecture and pipeline remain the same.

Cybernorse commented 3 years ago

data_x, sampling_rate = librosa.load(dir_+soundDir,res_type='kaiser_fast') mfccs = np.mean(librosa.feature.mfcc(y=data_x, sr=sampling_rate, n_mfcc=40).T,axis=0)

^^^ i have done that, i have the 40 features for each audio and their respective classes(diseases), what i want to know is how did you input shaped your feature engineered data for GRU deep neural network to (None, 1, 40), did you use keras embedding layer ? or did you just used pandas and numpy for reshaping the input data ? please provide guidance , code would be great Thank you.