DjPapzin commited on
Commit
c77acf1
·
1 Parent(s): 8e94786

Add falcondemo.mp4 and .keras model to Git LFS

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .env.example +5 -0
  2. .gitattributes +2 -0
  3. .gitignore +14 -0
  4. .streamlit/secrets.toml +3 -0
  5. Disease_Detection/app.py +80 -0
  6. Disease_Detection/code +1 -0
  7. Disease_Detection/for_all_classe.ipynb +0 -0
  8. Disease_Detection/requirements.txt +7 -0
  9. Disease_Detection/test/Covid/0100.jpeg +3 -0
  10. Disease_Detection/test/Covid/0102.jpeg +3 -0
  11. Disease_Detection/test/Covid/0105.png +0 -0
  12. Disease_Detection/test/Covid/0106.jpeg +3 -0
  13. Disease_Detection/test/Covid/0108.jpeg +3 -0
  14. Disease_Detection/test/Covid/0111.jpg +3 -0
  15. Disease_Detection/test/Covid/0112.jpg +3 -0
  16. Disease_Detection/test/Covid/0113.jpg +3 -0
  17. Disease_Detection/test/Covid/0115.jpeg +3 -0
  18. Disease_Detection/test/Covid/0118.jpeg +3 -0
  19. Disease_Detection/test/Covid/0119.jpeg +3 -0
  20. Disease_Detection/test/Covid/0120.jpg +3 -0
  21. Disease_Detection/test/Covid/094 - Copy.png +0 -0
  22. Disease_Detection/test/Covid/094.png +0 -0
  23. Disease_Detection/test/Covid/096.png +0 -0
  24. Disease_Detection/test/Covid/098.jpeg +3 -0
  25. Disease_Detection/test/Covid/COVID-00003b.jpg +3 -0
  26. Disease_Detection/test/Covid/COVID-00012.jpg +3 -0
  27. Disease_Detection/test/Covid/COVID-00022.jpg +3 -0
  28. Disease_Detection/test/Covid/COVID-00033.jpg +3 -0
  29. Disease_Detection/test/Covid/COVID-00037.jpg +3 -0
  30. Disease_Detection/test/Covid/auntminnie-2020_01_31_20_24_2322_2020_01_31_x-ray_coronavirus_US.jpg +3 -0
  31. Disease_Detection/test/Covid/auntminnie-a-2020_01_28_23_51_6665_2020_01_28_Vietnam_coronavirus.jpeg +3 -0
  32. Disease_Detection/test/Covid/auntminnie-b-2020_01_28_23_51_6665_2020_01_28_Vietnam_coronavirus.jpeg +3 -0
  33. Disease_Detection/test/Covid/auntminnie-c-2020_01_28_23_51_6665_2020_01_28_Vietnam_coronavirus.jpeg +3 -0
  34. Disease_Detection/test/Covid/auntminnie-d-2020_01_28_23_51_6665_2020_01_28_Vietnam_coronavirus.jpeg +3 -0
  35. Disease_Detection/test/Covid/radiopaedia-2019-novel-coronavirus-infected-pneumonia.jpg +3 -0
  36. Disease_Detection/test/Normal_chestxray/0101.jpeg +3 -0
  37. Disease_Detection/test/Normal_chestxray/0102.jpeg +3 -0
  38. Disease_Detection/test/Normal_chestxray/0103.jpeg +3 -0
  39. Disease_Detection/test/Normal_chestxray/0105.jpeg +3 -0
  40. Disease_Detection/test/Normal_chestxray/0106.jpeg +3 -0
  41. Disease_Detection/test/Normal_chestxray/0107.jpeg +3 -0
  42. Disease_Detection/test/Normal_chestxray/0108.jpeg +3 -0
  43. Disease_Detection/test/Normal_chestxray/0109.jpeg +3 -0
  44. Disease_Detection/test/Normal_chestxray/0110.jpeg +3 -0
  45. Disease_Detection/test/Normal_chestxray/0111.jpeg +3 -0
  46. Disease_Detection/test/Normal_chestxray/0112.jpeg +3 -0
  47. Disease_Detection/test/Normal_chestxray/0114.jpeg +3 -0
  48. Disease_Detection/test/Normal_chestxray/0115.jpeg +3 -0
  49. Disease_Detection/test/Normal_chestxray/0116.jpeg +3 -0
  50. Disease_Detection/test/Normal_chestxray/0117.jpeg +3 -0
.env.example ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ AI71_API_KEY= # Get at https://marketplace.ai71.ai/api-keys
2
+ ROBOFLOW_API_KEY= # Get at https://app.roboflow.com/
3
+
4
+ INFERENCE_API_URL=
5
+ INFERENCE_API_KEY=
.gitattributes CHANGED
@@ -33,5 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
36
  *.jpeg filter=lfs diff=lfs merge=lfs -text
37
  *.jpg filter=lfs diff=lfs merge=lfs -text
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ frontend/react-code/src/assets/falcondemo.mp4 filter=lfs diff=lfs merge=lfs -text
37
+ frontend/FINAL_MODEL.keras filter=lfs diff=lfs merge=lfs -text
38
  *.jpeg filter=lfs diff=lfs merge=lfs -text
39
  *.jpg filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.pyc
2
+ __pycache__/
3
+ db.sqlite3
4
+ .env
5
+ .conda/
6
+ .venv/
7
+ .vscode/
8
+
9
+ backend/.hc_backend
10
+ backend/api/migrations/*
11
+
12
+ frontend/.hc_frontend
13
+ .aider*
14
+ frontend/.streamlit/secrets.toml
.streamlit/secrets.toml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ INFERENCE_API_URL = "https://detect.roboflow.com"
2
+ INFERENCE_API_KEY = "LSbJ0tl3WTLn4Aqar0Sp"
3
+ AI71_API_KEY = "api71-api-1a7b704d-f950-4507-95cc-c26ce3457d75"
Disease_Detection/app.py ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from PIL import Image
3
+ import tensorflow as tf
4
+ import cv2
5
+ import numpy as np
6
+
7
+ # Load the model
8
+ try:
9
+ model = tf.keras.models.load_model('FINAL_MODEL.keras')
10
+ except FileNotFoundError:
11
+ st.error("Disease classification model not found. Please ensure 'FINAL_MODEL.keras' is in the same directory as this app.")
12
+ model = None
13
+
14
+ # Title of the app
15
+ st.title("DISEASE DETECTION n CLASSIFICATION")
16
+
17
+ # Upload an image file
18
+ uploaded_image = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
19
+
20
+ if uploaded_image is not None and model is not None:
21
+
22
+ img_opened = Image.open(uploaded_image).convert('RGB')
23
+ #image_opened = Image.open(uploaded_image)
24
+ image_pred = np.array(img_opened)
25
+ image_pred = cv2.resize(image_pred, (150, 150))
26
+
27
+ # Convert the image to a numpy array
28
+ image_pred = np.array(image_pred)
29
+
30
+ # Rescale the image (if the model was trained with rescaling)
31
+ image_pred = image_pred / 255.0
32
+
33
+ # Add an extra dimension to match the input shape (1, 150, 150, 3)
34
+ image_pred = np.expand_dims(image_pred, axis=0)
35
+
36
+ # Print the shape of the preprocessed image
37
+ print("Shape of the preprocessed image:", image_pred.shape)
38
+
39
+ # Predict using the model
40
+ prediction = model.predict(image_pred)
41
+
42
+ # Example prediction output
43
+ prediction = np.array(prediction)
44
+
45
+ #print(f"Prediction_Classes for different types\ncovid: 0\nnormal_chestray: 1\npneumonia: 2")
46
+
47
+ # Get the predicted class
48
+ predicted_ = np.argmax(prediction)
49
+ # Display the image
50
+ print(f"Predicted array for : {predicted_}")
51
+
52
+ # Decode the prediction
53
+ if predicted_ == 0:
54
+ predicted_class= "Covid"
55
+ elif predicted_ == 1:
56
+ predicted_class= "Normal_chestray"
57
+ else:
58
+ predicted_class= "Pneumonia"
59
+
60
+ # Print the predicted class
61
+ print(f'The predicted class is: {predicted_class}')
62
+ #print(prediction)
63
+
64
+
65
+ st.image(image_pred, caption='Input image by user', use_column_width=True)
66
+ st.write("CLasses description for understanding")
67
+ st.write("Prediction Classes for different types:")
68
+ st.write("COVID: 0")
69
+ st.write("Normal Chest X-ray: 1")
70
+ st.write("Pneumonia: 2")
71
+ st.write("\n")
72
+ # Display some text
73
+ st.write("DETECTED DISEASE DISPLAY")
74
+ st.write(f"Predicted Class : {predicted_}")
75
+ st.write(predicted_class)
76
+ else:
77
+ st.write("Please upload an image file or ensure the disease model is loaded.")
78
+
79
+
80
+
Disease_Detection/code ADDED
@@ -0,0 +1 @@
 
 
1
+
Disease_Detection/for_all_classe.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
Disease_Detection/requirements.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ opencv-python
2
+ opencv-python-headless
3
+ opencv-contrib-python
4
+ pillow
5
+ tensorflow
6
+ scikit-learn
7
+ streamlit
Disease_Detection/test/Covid/0100.jpeg ADDED

Git LFS Details

  • SHA256: f8ca25261981c4ce4e37247d90cba75296b2a24182e03fbd6219c28a46467ffb
  • Pointer size: 131 Bytes
  • Size of remote file: 163 kB
Disease_Detection/test/Covid/0102.jpeg ADDED

Git LFS Details

  • SHA256: 986e52a1d6427ed5bf514a0d9da43046230f9fe3c9a90074b23fca4ee5e4518f
  • Pointer size: 131 Bytes
  • Size of remote file: 202 kB
Disease_Detection/test/Covid/0105.png ADDED
Disease_Detection/test/Covid/0106.jpeg ADDED

Git LFS Details

  • SHA256: 4637783d6eabe44b6c656517395b4ab8768e95cbb06d12c5a6cf4c258a35ce90
  • Pointer size: 131 Bytes
  • Size of remote file: 184 kB
Disease_Detection/test/Covid/0108.jpeg ADDED

Git LFS Details

  • SHA256: 6e364cd747f55ef9c837eae035664acddc61c34c2255328aa38da820dcfcf6df
  • Pointer size: 131 Bytes
  • Size of remote file: 193 kB
Disease_Detection/test/Covid/0111.jpg ADDED

Git LFS Details

  • SHA256: bd084d7f2aa83e01a8d8c47e9de6b1e9393da26003c790c1217635d18ed286cd
  • Pointer size: 131 Bytes
  • Size of remote file: 109 kB
Disease_Detection/test/Covid/0112.jpg ADDED

Git LFS Details

  • SHA256: 26fe77829e9267880ed280ec5a780b63b0e8fded7f8837c16388dfb67cc4ae6c
  • Pointer size: 131 Bytes
  • Size of remote file: 109 kB
Disease_Detection/test/Covid/0113.jpg ADDED

Git LFS Details

  • SHA256: c41772443e1843264679cef27ff9ce59fd343d5b08aeb02c4faf43e26bed899d
  • Pointer size: 131 Bytes
  • Size of remote file: 107 kB
Disease_Detection/test/Covid/0115.jpeg ADDED

Git LFS Details

  • SHA256: 0e201d94134c9356bb787a4f9bfcd34768969d5cbfab79934ba5ef3cdd910bbd
  • Pointer size: 131 Bytes
  • Size of remote file: 148 kB
Disease_Detection/test/Covid/0118.jpeg ADDED

Git LFS Details

  • SHA256: 97ec9ff05883aaccf55488a57a67ac2897a13b3d6c1fed480611c9169b0be06d
  • Pointer size: 131 Bytes
  • Size of remote file: 139 kB
Disease_Detection/test/Covid/0119.jpeg ADDED

Git LFS Details

  • SHA256: 39a1d3f8682090978ef8c12780ccfc23ced62645e837687ffe6ffb20a67fd0c6
  • Pointer size: 131 Bytes
  • Size of remote file: 124 kB
Disease_Detection/test/Covid/0120.jpg ADDED

Git LFS Details

  • SHA256: 361ed3c0f4c20ddd9595e13e284eae086234a52482f8ff7ad7b8e39c1af75b94
  • Pointer size: 130 Bytes
  • Size of remote file: 93.7 kB
Disease_Detection/test/Covid/094 - Copy.png ADDED
Disease_Detection/test/Covid/094.png ADDED
Disease_Detection/test/Covid/096.png ADDED
Disease_Detection/test/Covid/098.jpeg ADDED

Git LFS Details

  • SHA256: f9bc015f5523d3f0ea970519c86363173c427d1c47d1bac7ed136a7da5eebf93
  • Pointer size: 131 Bytes
  • Size of remote file: 192 kB
Disease_Detection/test/Covid/COVID-00003b.jpg ADDED

Git LFS Details

  • SHA256: 6b78226347f16a2c09927d4182b591f7ce99c596b456e34582df1c24064887e7
  • Pointer size: 131 Bytes
  • Size of remote file: 130 kB
Disease_Detection/test/Covid/COVID-00012.jpg ADDED

Git LFS Details

  • SHA256: 63bb047c4a3a16721e128fda55c264259858d9d5c76840bfb063c245197c20c0
  • Pointer size: 130 Bytes
  • Size of remote file: 31.1 kB
Disease_Detection/test/Covid/COVID-00022.jpg ADDED

Git LFS Details

  • SHA256: be90dc28e91383e5af77e3048d53620635b9b37d16f106d8535932e86080b224
  • Pointer size: 130 Bytes
  • Size of remote file: 42.6 kB
Disease_Detection/test/Covid/COVID-00033.jpg ADDED

Git LFS Details

  • SHA256: 480a40f48587ba578d0624595a6f9e28a1e1efd78b0d6b81183fa7d562b49d0f
  • Pointer size: 130 Bytes
  • Size of remote file: 54.3 kB
Disease_Detection/test/Covid/COVID-00037.jpg ADDED

Git LFS Details

  • SHA256: 128fae5a51ed3edf3135b5aedb2ee715380038a59f83c8d5864e633ac2191ba2
  • Pointer size: 130 Bytes
  • Size of remote file: 46.5 kB
Disease_Detection/test/Covid/auntminnie-2020_01_31_20_24_2322_2020_01_31_x-ray_coronavirus_US.jpg ADDED

Git LFS Details

  • SHA256: 26fe77829e9267880ed280ec5a780b63b0e8fded7f8837c16388dfb67cc4ae6c
  • Pointer size: 131 Bytes
  • Size of remote file: 109 kB
Disease_Detection/test/Covid/auntminnie-a-2020_01_28_23_51_6665_2020_01_28_Vietnam_coronavirus.jpeg ADDED

Git LFS Details

  • SHA256: 9d9194336e3d6152ff348289a711e37eebf6444e9e166472ba5fcef36a485f9d
  • Pointer size: 131 Bytes
  • Size of remote file: 135 kB
Disease_Detection/test/Covid/auntminnie-b-2020_01_28_23_51_6665_2020_01_28_Vietnam_coronavirus.jpeg ADDED

Git LFS Details

  • SHA256: 0fe57e490c7e52623c42cac6f64ecf8a83d1a6d26cd855bc2db04820b9eeda13
  • Pointer size: 131 Bytes
  • Size of remote file: 130 kB
Disease_Detection/test/Covid/auntminnie-c-2020_01_28_23_51_6665_2020_01_28_Vietnam_coronavirus.jpeg ADDED

Git LFS Details

  • SHA256: d4441e030c9882f4ff1bb321ac26e12a402efa4b36b0680d6c9da97480fabd71
  • Pointer size: 131 Bytes
  • Size of remote file: 131 kB
Disease_Detection/test/Covid/auntminnie-d-2020_01_28_23_51_6665_2020_01_28_Vietnam_coronavirus.jpeg ADDED

Git LFS Details

  • SHA256: d1a5232758000c3e1d5379c6dbc6149ba5c62be1f571354ae4c4183ea98f3c3c
  • Pointer size: 131 Bytes
  • Size of remote file: 118 kB
Disease_Detection/test/Covid/radiopaedia-2019-novel-coronavirus-infected-pneumonia.jpg ADDED

Git LFS Details

  • SHA256: 6fa91ffa77bb84823f1352e2248b1332301b398e55261dd331cd87b5c6161195
  • Pointer size: 131 Bytes
  • Size of remote file: 271 kB
Disease_Detection/test/Normal_chestxray/0101.jpeg ADDED

Git LFS Details

  • SHA256: ff76a4b1acc8daaf0140c25f595d7b7c32e1fb87d4c7a646bd7e008a837f2391
  • Pointer size: 131 Bytes
  • Size of remote file: 539 kB
Disease_Detection/test/Normal_chestxray/0102.jpeg ADDED

Git LFS Details

  • SHA256: 862962ee4ff3c18f4301ad87b560f85bdb294ce293d5bee5d888fe86e9a76ba4
  • Pointer size: 131 Bytes
  • Size of remote file: 570 kB
Disease_Detection/test/Normal_chestxray/0103.jpeg ADDED

Git LFS Details

  • SHA256: 1ea33e48d5ab20ed999edb1becfe5bc5cd557b5430afe69880f5333c4b2a1486
  • Pointer size: 131 Bytes
  • Size of remote file: 499 kB
Disease_Detection/test/Normal_chestxray/0105.jpeg ADDED

Git LFS Details

  • SHA256: 46584a87fcc9dddbb7e3fd408a8e9d68eaf530af8a071cee3b73ba48e7becc9a
  • Pointer size: 131 Bytes
  • Size of remote file: 513 kB
Disease_Detection/test/Normal_chestxray/0106.jpeg ADDED

Git LFS Details

  • SHA256: 1bc10d7092437685ac85849981b7fad11eaa896bc60a2d282c31fabf42e502ff
  • Pointer size: 131 Bytes
  • Size of remote file: 550 kB
Disease_Detection/test/Normal_chestxray/0107.jpeg ADDED

Git LFS Details

  • SHA256: 554003b03fd9bf8fdcc6cc1f08e85dfacb4c397b21e7e07b8a284d60afde176a
  • Pointer size: 131 Bytes
  • Size of remote file: 488 kB
Disease_Detection/test/Normal_chestxray/0108.jpeg ADDED

Git LFS Details

  • SHA256: b01f35107133d1a68d911d3a7218c28bc167b1afd4c18396c9a1b5b0722ea5c6
  • Pointer size: 131 Bytes
  • Size of remote file: 484 kB
Disease_Detection/test/Normal_chestxray/0109.jpeg ADDED

Git LFS Details

  • SHA256: ca21af853f4754013056b0692e7459fed7fa8b744096ff7f3bf45762b4867042
  • Pointer size: 131 Bytes
  • Size of remote file: 495 kB
Disease_Detection/test/Normal_chestxray/0110.jpeg ADDED

Git LFS Details

  • SHA256: 81108467cefb1d2a4794cddcd635139a78e0f0f7ebfd45380eddff9808e2a6ce
  • Pointer size: 131 Bytes
  • Size of remote file: 470 kB
Disease_Detection/test/Normal_chestxray/0111.jpeg ADDED

Git LFS Details

  • SHA256: 4fc10e82e4b433852195f7a3b003a8326627f7930768452363e0de49904cfc13
  • Pointer size: 131 Bytes
  • Size of remote file: 482 kB
Disease_Detection/test/Normal_chestxray/0112.jpeg ADDED

Git LFS Details

  • SHA256: fa125c8b5b8bd819ef86f9f46259784727ef9e1cb39c99a1223f95541a73c317
  • Pointer size: 131 Bytes
  • Size of remote file: 499 kB
Disease_Detection/test/Normal_chestxray/0114.jpeg ADDED

Git LFS Details

  • SHA256: 237ee64dec38488c8242eeba272ccca5e12ab9df0ca17e0493cc5f5bd87efdf5
  • Pointer size: 131 Bytes
  • Size of remote file: 476 kB
Disease_Detection/test/Normal_chestxray/0115.jpeg ADDED

Git LFS Details

  • SHA256: 2feb120edf8035689ad765c07b095e9f9c236cff8dbb5d1e8d148dfd687a3a3b
  • Pointer size: 131 Bytes
  • Size of remote file: 499 kB
Disease_Detection/test/Normal_chestxray/0116.jpeg ADDED

Git LFS Details

  • SHA256: eff056ca06e9de5ce8e0ad88867c0b6c48e567d5f96632a56e505fa47c3ec273
  • Pointer size: 131 Bytes
  • Size of remote file: 523 kB
Disease_Detection/test/Normal_chestxray/0117.jpeg ADDED

Git LFS Details

  • SHA256: c6a88af0581fa525c41e8af69d385541cf82e8c32b8dfa85838af274106c2975
  • Pointer size: 131 Bytes
  • Size of remote file: 501 kB