Poster basically done, finished organizing directory structure

This commit is contained in:
Aidan Sharpe 2024-05-01 02:09:27 -04:00
parent fd6e4f32a4
commit 0e94757c07
19 changed files with 29137 additions and 59 deletions

Binary file not shown.

BIN
poster/references_dir.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
poster/src_dir.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

View File

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 132 KiB

View File

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

View File

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 163 KiB

View File

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

59
src/]
View File

@ -1,59 +0,0 @@
import json
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
import copy
def main():
data = {}
with open("results/cifar10_fgsm.json", "r") as infile:
data = json.load(infile)
attack = data["attack"]
epsilons = data["epsilons"]
filters = data["filters"]
dataset = data["dataset"]
strength_count = len(filters[list(filters.keys())[0]][0])
strengths = np.arange(strength_count)
epsilons = np.array(epsilons)
# Assume constant step of strength and epsilon
dstrength = strengths[1] - strengths[0]
depsilon = epsilons[1] - epsilons[0]
# Make a grid from strengths and epsilons
strengths, epsilons = np.meshgrid(strengths,epsilons)
#strengths, epsilons = strengths.ravel(), epsilons.ravel()
colors = ('blue', 'orange', 'red', 'purple', 'green', 'yellow', 'brown')
z = np.zeros_like(strengths)
best_performance = np.zeros_like(strengths)
bottoms = np.zeros_like(strengths)
for i, filter in enumerate(filters):
performance = np.array(filters[filter])
best_performance = np.where(performance > best_performance, i, best_performance)
z = np.where(performance > z, performance, z)
print(best_performance)
for i, filter in enumerate(filters):
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
tops = np.where(best_performance == i, best_performance, 0)
print(strengths.shape, epsilons.shape, bottoms.shape, dstrength.shape, depsilon.shape, tops.shape)
ax.bar3d(strengths, epsilons, bottoms, dstrength, depsilon, tops, color=colors[i])
plt.show()
ax.view_init(90, -90, 0)
plt.legend()
plt.title(f"{filter} Performance")
plt.xlabel(f"{attack} Attack Strength ($\\epsilon$)")
plt.ylabel(f"{dataset} Classification Accuracy")
plt.show()
if __name__ == "__main__":
main()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB