-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
81 lines (76 loc) · 5.43 KB
/
MainWindow.xaml
File metadata and controls
81 lines (76 loc) · 5.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<Window x:Class="SAMViewer.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:SAMViewer"
mc:Ignorable="d"
Title="MainWindow" Height="600" Width="1000" Background="Gray">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<DockPanel x:Name="LoadImgGrid" >
<Button x:Name="ImgSelButton" Content="Select Image" Height="30" Click="SelectFileButton_Click" Margin="150,0,0,0" VerticalAlignment="Center"/>
<TextBox x:Name="ImgPathTxt" Height="30" Text="Enter image path here" Margin="50,0,50,0" VerticalAlignment="Center" />
</DockPanel>
<Canvas x:Name="ImgCanvas" Visibility="Collapsed" PreviewMouseLeftButtonDown="image_MouseLeftButtonDown" MouseMove="image_MouseMove" PreviewMouseLeftButtonUp="image_PreviewMouseLeftButtonUp">
<Image x:Name="mImage" Stretch="Fill"
Canvas.Left="0" Canvas.Top="0" Canvas.Right="0" Canvas.Bottom="0"/>
<Image x:Name="mMask" Stretch="Fill"
Canvas.Left="0" Canvas.Top="0" Canvas.Right="0" Canvas.Bottom="0"/>
</Canvas>
</Grid>
<StackPanel Grid.Column="1" >
<TextBlock x:Name="PromotionTypeTxt" Width="150" Height="30" Text="PromotionType:" HorizontalAlignment="Left" Margin="20,30,0,0"/>
<StackPanel x:Name="mPromotSP" Width="200" HorizontalAlignment="Left" Margin="20,0,0,0" >
<Expander x:Name="mPointexp" Header="Point" IsExpanded="True" Expanded="Expanded">
<StackPanel>
<DockPanel x:Name="mOpTypeDP" Width="200" Height="30" HorizontalAlignment="Left" Margin="5,0,0,0">
<RadioButton x:Name="RAdd" Content="Add Mask" GroupName="ProOperationType" IsChecked="True" />
<RadioButton x:Name="RRemove" Content="Remove Mask" GroupName="ProOperationType" Margin="5,0,0,0"/>
</DockPanel>
<Button x:Name="mAddPoint" Width="70" Height="30" Content="AddPoint" Click="mAddPoint_Click"/>
</StackPanel>
</Expander>
<Expander x:Name="mBoxexp" Header="Box" IsExpanded="False" Expanded="Expanded">
<StackPanel>
<Button x:Name="mAddBox" Width="70" Height="30" Content="AddBox" Click="mAddBox_Click"/>
</StackPanel>
</Expander>
<Expander x:Name="mEverythingExp" Header="EveryThing" IsExpanded="False" Expanded="Expanded">
<StackPanel>
<DockPanel Width="200" Height="50" HorizontalAlignment="Left" Margin="5,0,0,0">
<TextBlock Margin="5,0,0,0" Height="20">points_per_side:</TextBlock>
<TextBox x:Name="mPoints_per_side" Margin="5,0,0,0" Height="20">4</TextBox>
</DockPanel>
<DockPanel Width="200" Height="50" HorizontalAlignment="Left" Margin="5,0,0,0">
<TextBlock Margin="5,0,0,0" Height="20">pred_iou_thresh:</TextBlock>
<TextBox x:Name="mPred_iou_thresh" Margin="5,0,0,0" Height="20">0.88</TextBox>
</DockPanel>
<DockPanel Width="200" Height="50" HorizontalAlignment="Left" Margin="5,0,0,0">
<TextBlock Margin="5,0,0,0" Height="20">stability_score_thresh:</TextBlock>
<TextBox x:Name="mStability_score_thresh" Margin="5,0,0,0" Height="20">0.95</TextBox>
</DockPanel>
<Button x:Name="mAutoSeg" Width="70" Height="30" Content="AutoSeg" Click="mAutoSeg_Click"/>
</StackPanel>
</Expander>
<Expander x:Name="mTextExp" Header="Text" IsExpanded="False" Expanded="Expanded">
<StackPanel>
<TextBox x:Name="mTextinput" Margin="0,5,0,0" Height="50">a photo of</TextBox>
<Button x:Name="mText" Width="70" Height="30" Content="Match" Click="mText_Click"/>
</StackPanel>
</Expander>
</StackPanel>
<DockPanel Width="230" Height="30" HorizontalAlignment="Left" Margin="20,0,0,0">
<Button x:Name="BReset" Width="50" Height="30" Content="Reset" Click="BReset_Click"/>
<Button x:Name="BUndo" Width="50" Height="30" Content="Undo" Margin="10,0,0,0" Click="BUndo_Click"/>
<Button x:Name="BRedo" Width="50" Height="30" Content="Redo" Margin="10,0,0,0" Click="BRedo_Click"/>
<Button x:Name="BReLoad" Width="50" Height="30" Content="Reload" Margin="10,0,0,0" Click="BReLoad_Click"/>
</DockPanel>
<TextBlock x:Name="StatusTxt" Width="250" TextWrapping="Wrap" VerticalAlignment="Bottom" Foreground="Red" Margin="0,50,0,0"/>
</StackPanel>
</Grid>
</Window>