basilshaji commited on
Commit
b3d2362
·
verified ·
1 Parent(s): 8a7d30f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -31,7 +31,7 @@ for i, url in enumerate(file_urls):
31
  download_file(url, f"image_{i}.jpg")
32
 
33
  # Load YOLOv5 model (placeholder)
34
- model_path = "/Users/basilshaji/Desktop/Lung_Nodules_Segmentation/best.pt" # Path to your YOLOv5 model
35
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu") # Use GPU if available
36
  model = attempt_load(model_path, device=device) # Placeholder for model loading
37
  model.eval() # Set the model to evaluation mode
@@ -107,12 +107,12 @@ interface = gr.Interface(
107
  outputs=output_component,
108
  title="Lung Nodule Detection [ Segmentation Model ]",
109
  examples=[
110
- "/Users/basilshaji/Desktop/image_1.jpg",
111
- "/Users/basilshaji/Desktop/image_2.jpg",
112
- "/Users/basilshaji/Desktop/image_3.jpg",
113
- "/Users/basilshaji/Desktop/image_4.jpg",
114
- "/Users/basilshaji/Desktop/image_5.jpg",
115
- "/Users/basilshaji/Desktop/image_6.jpg",
116
  ],
117
  description=' "This online deployment proves the effectiveness and efficient function of the machine learning model in identifying lung cancer nodules. The implementation of YOLO for core detection tasks is employed that is an efficient and accurate algorithm for object detection. Through the precise hyper-parameter tuning process, the model proposed in this paper has given an impressive boost in the performance. Moreover, the model uses Retinanet algorithm which is recognized as the powerful tool effective in dense object detection. In an attempt to enhance the model’s performance, the backbone of this architecture consists of a Feature Pyramid Network (FPN). The FPN plays an important role in boosting the model’s capacity in recognizing objects in different scales through the construction of high semantic feature map in different resolutions. In conclusion, this deployment encompasses YOLOv5, hyperparameter optimization, Retinanet, and FPN as one of the most effective and modern solutions for the detection of lung cancer nodules." ~ Basil Shaji 😇',
118
  live=False,
 
31
  download_file(url, f"image_{i}.jpg")
32
 
33
  # Load YOLOv5 model (placeholder)
34
+ model_path = "best.pt" # Path to your YOLOv5 model
35
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu") # Use GPU if available
36
  model = attempt_load(model_path, device=device) # Placeholder for model loading
37
  model.eval() # Set the model to evaluation mode
 
107
  outputs=output_component,
108
  title="Lung Nodule Detection [ Segmentation Model ]",
109
  examples=[
110
+ "image_1.jpg",
111
+ "image_2.jpg",
112
+ "image_3.jpg",
113
+ "image_4.jpg",
114
+ "image_5.jpg",
115
+ "image_6.jpg",
116
  ],
117
  description=' "This online deployment proves the effectiveness and efficient function of the machine learning model in identifying lung cancer nodules. The implementation of YOLO for core detection tasks is employed that is an efficient and accurate algorithm for object detection. Through the precise hyper-parameter tuning process, the model proposed in this paper has given an impressive boost in the performance. Moreover, the model uses Retinanet algorithm which is recognized as the powerful tool effective in dense object detection. In an attempt to enhance the model’s performance, the backbone of this architecture consists of a Feature Pyramid Network (FPN). The FPN plays an important role in boosting the model’s capacity in recognizing objects in different scales through the construction of high semantic feature map in different resolutions. In conclusion, this deployment encompasses YOLOv5, hyperparameter optimization, Retinanet, and FPN as one of the most effective and modern solutions for the detection of lung cancer nodules." ~ Basil Shaji 😇',
118
  live=False,