-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in vessel prediction example: Validation failed: Key "json_path" is required #94
Comments
Able to hack my way around this - clearly an issue with parsing the arg string. class PredictionTask:
"""A task to predict vessels in one Sentinel-2 scene."""
def __init__(self, scene_id: str, ): # json_path: str, crop_path: str
"""Create a new PredictionTask.
Args:
scene_id: the Sentinel-2 scene ID.
json_path: path to write the JSON of vessel detections.
crop_path: path to write the vessel crop images.
"""
self.scene_id = scene_id
self.json_path = "out.json" # json_path
self.crop_path = "/teamspace/studios/this_studio/rslearn_projects/output_crops" # crop_path Run with
|
I've tried a scene over LA port
I then convert import pandas as pd
import geopandas as gpd
prediction_file = 'out.json'
df = pd.read_json(prediction_file)
# Filter predictions with score > 0.75
df = df[df["score"] > 0.75]
gdf = gpd.GeoDataFrame(df, geometry=gpd.points_from_xy(df.longitude, df.latitude))
gdf.to_file("out.geojson", driver="GeoJSON") |
I see different results in a fresh conda environment. Note that the last command below is fixed, it should have a JSON object inside the list to make it valid JSON, we will fix it later. Using 3.12.7 because 3.12.8 has some dependency issues involving Lightning / jsonargparse x.x
Used your code to make
|
It could be that the weights could not be found in the expected location so it is initializing the object detector randomly. It should say this in the output:
We do have an issue open (#89) to throw error if Let me know if this might've been the problem, or if there was a different problem, or if it's still not working based on the commands above. |
Thanks, yeah I ran into that problem too :) opened #95 for us to address later |
Following the example here:
The text was updated successfully, but these errors were encountered: