Update app.py
Browse files
app.py
CHANGED
|
@@ -63,8 +63,10 @@ hyperparameters = {
|
|
| 63 |
results_data = {
|
| 64 |
'SSD300': {'Transfer Pruning':{'map': [0.6, 0.65, 0.7, 0.75], 'flops': [1e9, 1.1e9, 1.2e9, 1.3e9], 'params': [1e6, 1.1e6, 1.2e6, 1.3e6]},
|
| 65 |
'VIB Pruning':{'map': [0.9, 0.65, 0.7, 0.75], 'flops': [1e9, 1.1e9, 1.2e9, 1.3e9], 'params': [1e6, 1.1e6, 1.2e6, 1.3e6]}},
|
| 66 |
-
'SSD512': {'map': [0.
|
| 67 |
-
|
|
|
|
|
|
|
| 68 |
}
|
| 69 |
|
| 70 |
# Title of the research
|
|
@@ -97,12 +99,21 @@ with col1:
|
|
| 97 |
# Display results table
|
| 98 |
|
| 99 |
results = results_data[model]
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
st.markdown(df_results.style.hide(axis="index").to_html(), unsafe_allow_html=True)
|
| 108 |
|
|
@@ -110,18 +121,22 @@ with col1:
|
|
| 110 |
st.subheader('Evolution Graphs')
|
| 111 |
epochs = [1, 2, 3, 4]
|
| 112 |
|
| 113 |
-
fig = go.Figure()
|
| 114 |
-
fig.add_trace(go.Scatter(x=epochs, y=results['map'], mode='lines+markers', name='mAP'))
|
| 115 |
-
fig.update_layout(title='mAP per Epoch', xaxis_title='Epoch', yaxis_title='mAP')
|
| 116 |
-
st.plotly_chart(fig, use_container_width=True)
|
| 117 |
|
| 118 |
fig = go.Figure()
|
| 119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
fig.update_layout(title='FLOPs per Epoch', xaxis_title='Epoch', yaxis_title='FLOPs')
|
| 121 |
st.plotly_chart(fig, use_container_width=True)
|
| 122 |
|
| 123 |
fig = go.Figure()
|
| 124 |
-
fig.add_trace(go.Scatter(x=epochs, y=results['params'], mode='lines+markers', name='Params', line=dict(color='green')))
|
| 125 |
fig.update_layout(title='Params per Epoch', xaxis_title='Epoch', yaxis_title='Params')
|
| 126 |
st.plotly_chart(fig, use_container_width=True)
|
| 127 |
|
|
|
|
| 63 |
results_data = {
|
| 64 |
'SSD300': {'Transfer Pruning':{'map': [0.6, 0.65, 0.7, 0.75], 'flops': [1e9, 1.1e9, 1.2e9, 1.3e9], 'params': [1e6, 1.1e6, 1.2e6, 1.3e6]},
|
| 65 |
'VIB Pruning':{'map': [0.9, 0.65, 0.7, 0.75], 'flops': [1e9, 1.1e9, 1.2e9, 1.3e9], 'params': [1e6, 1.1e6, 1.2e6, 1.3e6]}},
|
| 66 |
+
'SSD512': {'Transfer Pruning':{'map': [0.6, 0.65, 0.7, 0.75], 'flops': [1e9, 1.1e9, 1.2e9, 1.3e9], 'params': [1e6, 1.1e6, 1.2e6, 1.3e6]},
|
| 67 |
+
'VIB Pruning':{'map': [0.9, 0.65, 0.7, 0.75], 'flops': [1e9, 1.1e9, 1.2e9, 1.3e9], 'params': [1e6, 1.1e6, 1.2e6, 1.3e6]}},
|
| 68 |
+
'DETR': {'SPARK':{'map': [0.6, 0.65, 0.7, 0.75], 'flops': [1e9, 1.1e9, 1.2e9, 1.3e9], 'params': [1e6, 1.1e6, 1.2e6, 1.3e6]},
|
| 69 |
+
'VOC':{'map': [0.9, 0.65, 0.7, 0.75], 'flops': [1e9, 1.1e9, 1.2e9, 1.3e9], 'params': [1e6, 1.1e6, 1.2e6, 1.3e6]}},
|
| 70 |
}
|
| 71 |
|
| 72 |
# Title of the research
|
|
|
|
| 99 |
# Display results table
|
| 100 |
|
| 101 |
results = results_data[model]
|
| 102 |
+
if model in ['SSD300', 'SSD512']:
|
| 103 |
+
df_results = pd.DataFrame({
|
| 104 |
+
'Model': [model]*4,
|
| 105 |
+
'mAP': results[pruning]['map'],
|
| 106 |
+
'FLOPs': results[pruning]['flops'],
|
| 107 |
+
'Params': results[pruning]['params']
|
| 108 |
+
})
|
| 109 |
+
else:
|
| 110 |
+
df_results = pd.DataFrame({
|
| 111 |
+
'Model': [model]*4,
|
| 112 |
+
'mAP': results[dataset]['map'],
|
| 113 |
+
'FLOPs': results[dataset]['flops'],
|
| 114 |
+
'Params': results[dataset]['params']
|
| 115 |
+
})
|
| 116 |
+
|
| 117 |
|
| 118 |
st.markdown(df_results.style.hide(axis="index").to_html(), unsafe_allow_html=True)
|
| 119 |
|
|
|
|
| 121 |
st.subheader('Evolution Graphs')
|
| 122 |
epochs = [1, 2, 3, 4]
|
| 123 |
|
| 124 |
+
# fig = go.Figure()
|
| 125 |
+
# fig.add_trace(go.Scatter(x=epochs, y=results['map'], mode='lines+markers', name='mAP'))
|
| 126 |
+
# fig.update_layout(title='mAP per Epoch', xaxis_title='Epoch', yaxis_title='mAP')
|
| 127 |
+
# st.plotly_chart(fig, use_container_width=True)
|
| 128 |
|
| 129 |
fig = go.Figure()
|
| 130 |
+
if model in ['SSD300', 'SSD512']:
|
| 131 |
+
ff=pruning
|
| 132 |
+
else:
|
| 133 |
+
ff=dataset
|
| 134 |
+
fig.add_trace(go.Scatter(x=epochs, y=results[ff]['flops'], mode='lines+markers', name='FLOPs', line=dict(color='orange')))
|
| 135 |
fig.update_layout(title='FLOPs per Epoch', xaxis_title='Epoch', yaxis_title='FLOPs')
|
| 136 |
st.plotly_chart(fig, use_container_width=True)
|
| 137 |
|
| 138 |
fig = go.Figure()
|
| 139 |
+
fig.add_trace(go.Scatter(x=epochs, y=results[ff]['params'], mode='lines+markers', name='Params', line=dict(color='green')))
|
| 140 |
fig.update_layout(title='Params per Epoch', xaxis_title='Epoch', yaxis_title='Params')
|
| 141 |
st.plotly_chart(fig, use_container_width=True)
|
| 142 |
|