refactor: reorganize project structure by moving core modules and update import paths in API server

This commit is contained in:
2026-07-18 01:24:30 +07:00
parent abab846884
commit a82b2f6fa5
155 changed files with 25 additions and 370 deletions
+19
View File
@@ -0,0 +1,19 @@
import joblib
import geopandas as gpd
import numpy as np
cache_file = "dataset_cache/training_data_2d.joblib"
data = joblib.load(cache_file)
X = data['X']
print("X shape:", len(X))
gdf = gpd.read_file("train/ST_training_data_updated_1130points_new.shp")
gdf = gdf.to_crs("EPSG:32648")
print("gdf length:", len(gdf))
if len(X) == len(gdf):
y = [(row['HT_code'] - 1) for idx, row in gdf.iterrows()]
joblib.dump({'X': X, 'y': y}, cache_file)
print("Fixed y in cache! Saved.")
else:
print("Lengths do not match, cannot fix automatically.")