diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..026c945 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Created by venv; see https://docs.python.org/3/library/venv.html +ShipD/ +ShipGen/ +Scripts/ +Lib/ +Include/ +share/ +TrainingData/* +OutputData/* +anomaly_map.png +originaly_map.png +pyvenv.cfg +modified_model.stl +sample_Hull_Mesh.stl \ No newline at end of file diff --git a/main.py b/main.py index 2376cab..841e420 100644 --- a/main.py +++ b/main.py @@ -44,10 +44,10 @@ def run_detection(fileLocation, clip): 'log_kernel': 1.5 # LoG kernel size } anomaly_map_value = get_anomaly_map(npArray, params) - if (clip == 1): + if (clip == 1): #clips to [0, 1] anomaly_map_value = np.clip(anomaly_map_value, 0, 1) # limit range from 0 - 1. If outside, round to that value - elif (clip == 2): + elif (clip == 2): #binary anomaly_map_value = np.where(anomaly_map_value >= 0.5, 1, 0) # set value to either 0 or 1. rounds up if >= 0.5, else down return (npArray, anomaly_map_value) # returns original, and analyzed version for comparison.