ntsc207 commited on
Commit
5cd5f33
·
verified ·
1 Parent(s): 5e43db6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -89,9 +89,9 @@ def yolov9_inference(model_id, img_path=None, vid_path=None, tracking_algorithm
89
  sns.barplot(ax = ax, data = df, x = 'label', y = 'count', palette=palette, hue = 'label', legend = False)
90
 
91
  # Customizations
92
- ax.set_title('Count of Labels', fontsize=20)
93
- ax.set_xlabel('Label', fontsize=15)
94
- ax.set_ylabel('Count', fontsize=15)
95
  ax.tick_params(axis='x', rotation=45) # Rotate x-axis labels for better readability
96
  sns.despine() # Remove the top and right spines from plot
97
  #ax.legend()
@@ -104,11 +104,11 @@ def yolov9_inference(model_id, img_path=None, vid_path=None, tracking_algorithm
104
  fig, ax = plt.subplots(figsize=(10, 6))
105
  #for label in labels:
106
  #df_label = frame_counts_df[frame_counts_df['label'] == label]
107
- sns.lineplot(ax = ax, data = frame_counts_df, x = 'frame', y = 'count', hue = 'label', palette = palette)
108
 
109
- ax.set_xlabel('Frame')
110
- ax.set_ylabel('Count')
111
- ax.set_title('Count of Labels over Frames')
112
  ax.legend()
113
  ax.grid(True)
114
  ax.set_facecolor('#D3D3D3')
 
89
  sns.barplot(ax = ax, data = df, x = 'label', y = 'count', palette=palette, hue = 'label', legend = False)
90
 
91
  # Customizations
92
+ ax.set_title('Number of Objects', fontsize=20)
93
+ ax.set_xlabel('Object Class', fontsize=15)
94
+ ax.set_ylabel('Object Count', fontsize=15)
95
  ax.tick_params(axis='x', rotation=45) # Rotate x-axis labels for better readability
96
  sns.despine() # Remove the top and right spines from plot
97
  #ax.legend()
 
104
  fig, ax = plt.subplots(figsize=(10, 6))
105
  #for label in labels:
106
  #df_label = frame_counts_df[frame_counts_df['label'] == label]
107
+ sns.lineplot(ax = ax, data = frame_counts_df[::30], x = 'frame', y = 'count', hue = 'label', palette = palette)
108
 
109
+ ax.set_xlabel('Second')
110
+ ax.set_ylabel('Object Count')
111
+ ax.set_title('Number of Objects over Seconds')
112
  ax.legend()
113
  ax.grid(True)
114
  ax.set_facecolor('#D3D3D3')