FrancoMango
commited on
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<h1>Train Dataset Means and stds</h1>
|
2 |
+
lat_mean = 39.95157130295544
|
3 |
+
|
4 |
+
lat_std = 0.0006593704228342234
|
5 |
+
|
6 |
+
lon_mean = -75.19136178838008
|
7 |
+
|
8 |
+
lon_std = 0.0006865423903444358
|
9 |
+
|
10 |
+
<h1>Running Inference</h1>
|
11 |
+
model_path = hf_hub_download(repo_id="Latitude-Attitude/vit-gps-coordinates-predictor-with-filter", filename="vit-gps-coordinates-predictor-with-filter-2.pth") model = torch.load(model_path) model.eval()
|
12 |
+
|
13 |
+
with torch.no_grad(): for images in dataloader: images = images.to(device) outputs = model(images) preds = outputs.cpu() * torch.tensor([lat_std, lon_std]) + torch.tensor([lat_mean, lon_mean])
|