diff --git a/backend/core/tasks.py b/backend/core/tasks.py index 6bc7d81e..f8726a4e 100644 --- a/backend/core/tasks.py +++ b/backend/core/tasks.py @@ -68,8 +68,8 @@ def train_model( feedback=None, freeze_layers=False, multimasks=False, - input_contact_spacing=0.75, - input_boundary_width=0.5, + input_contact_spacing=8, + input_boundary_width=3, ): training_instance = get_object_or_404(Training, id=training_id) training_instance.status = "RUNNING" diff --git a/backend/core/views.py b/backend/core/views.py index befb8e10..8eb54f48 100644 --- a/backend/core/views.py +++ b/backend/core/views.py @@ -83,11 +83,11 @@ class TrainingSerializer( ): # serializers are used to translate models objects to api multimasks = serializers.BooleanField(required=False, default=False) - input_contact_spacing = serializers.FloatField( - required=False, default=0.75, min_value=0, max_value=5 + input_contact_spacing = serializers.IntegerField( + required=False, default=8, min_value=0, max_value=20 ) - input_boundary_width = serializers.FloatField( - required=False, default=0.5, min_value=0, max_value=5 + input_boundary_width = serializers.IntegerField( + required=False, default=3, min_value=0, max_value=10 ) class Meta: diff --git a/frontend/src/components/Layout/AIModels/AIModelEditor/AIModelEditor.js b/frontend/src/components/Layout/AIModels/AIModelEditor/AIModelEditor.js index c6dc4c18..e8aaabd0 100644 --- a/frontend/src/components/Layout/AIModels/AIModelEditor/AIModelEditor.js +++ b/frontend/src/components/Layout/AIModels/AIModelEditor/AIModelEditor.js @@ -39,8 +39,8 @@ const AIModelEditor = (props) => { const [freezeLayers, setFreezeLayers] = useState(false); const [multimasks, setMultimasks] = React.useState(false); - const [inputContactSpacing, setInputContactSpacing] = React.useState(1); - const [inputBoundaryWidth, setInputBoundaryWidth] = React.useState(0.25); + const [inputContactSpacing, setInputContactSpacing] = React.useState(8); + const [inputBoundaryWidth, setInputBoundaryWidth] = React.useState(3); const [popupRowData, setPopupRowData] = useState(null); const [feedbackCount, setFeedbackCount] = useState(0); @@ -421,12 +421,12 @@ const AIModelEditor = (props) => { type="number" helperText={ - Enter the distance in meters to extend the area around + Enter the distance in pixels to extend the area around each building. This will be used to find points where buildings come into contact or are in close proximity - to one another. For example, entering '0.75' will - explore areas within 75 centimers outside the original - building shapes to detect nearby buildings + to one another. For example, entering '8' will explore + areas within 8 pixels outside the original building + shapes to detect nearby buildings } value={inputContactSpacing} @@ -449,14 +449,13 @@ const AIModelEditor = (props) => { value={inputBoundaryWidth} helperText={ - Specify the width in meters to reduce the original + Specify the width in pixels to reduce the original building shape inwardly, creating a boundary or margin around each building. A smaller value creates a tighter boundary close to the building's edges, while a larger value creates a wider surrounding area. For - example, entering '0.5' will create a boundary that is - 50 centimeters inside from the original building - edges. + example, entering '3' will create a boundary that 3 + pixles inside from the original building edges. } fullWidth