Skip to content

Commit

Permalink
(bug): multimask_params : fix inconsistency in different zoom levels …
Browse files Browse the repository at this point in the history
…, added pixel as input instead of meters
  • Loading branch information
kshitijrajsharma committed Mar 27, 2024
1 parent c1b1ca0 commit 1488308
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
4 changes: 2 additions & 2 deletions backend/core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -421,12 +421,12 @@ const AIModelEditor = (props) => {
type="number"
helperText={
<span>
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
</span>
}
value={inputContactSpacing}
Expand All @@ -449,14 +449,13 @@ const AIModelEditor = (props) => {
value={inputBoundaryWidth}
helperText={
<span>
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.
</span>
}
fullWidth
Expand Down

0 comments on commit 1488308

Please sign in to comment.