Introduced solution structure for AIFotoONLUS migration to .NET. Added Core library with YOLO-based detection/recognition engine using OpenCvSharp, Console batch runner, and WPF demo frontend with MVVM. Implemented model loading, directory processing, progress reporting, and preferences. Added README with build/run instructions.
63 lines
No EOL
3.4 KiB
XML
63 lines
No EOL
3.4 KiB
XML
<Window x:Class="AIFotoONLUS.WPF.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="AI Foto ONLUS - Demo" Height="460" Width="700">
|
|
<Grid Margin="10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Orientation="Horizontal" Grid.Row="0" Margin="0,0,0,8">
|
|
<TextBlock VerticalAlignment="Center" Text="Images directory:" Margin="0,0,8,0"/>
|
|
<TextBox Text="{Binding ImagesDirectory, UpdateSourceTrigger=PropertyChanged}" Width="420" />
|
|
<Button Content="Browse" Margin="8,0,0,0" Width="75" Command="{Binding BrowseImagesCommand}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0,0,0,8">
|
|
<TextBlock VerticalAlignment="Center" Text="Models directory:" Margin="0,0,8,0"/>
|
|
<TextBox Text="{Binding ModelsDirectory, UpdateSourceTrigger=PropertyChanged}" Width="340" />
|
|
<Button Content="Browse" Margin="8,0,0,0" Width="75" Command="{Binding BrowseModelsCommand}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal" Grid.Row="2" Margin="0,0,0,8">
|
|
<Button Content="Load Models" Width="100" Command="{Binding LoadModelsCommand}"/>
|
|
<Button Content="Process" Width="100" Margin="8,0,0,0" Command="{Binding ProcessCommand}" IsEnabled="{Binding IsProcessing, Converter={StaticResource InverseBoolConverter}}" />
|
|
<Button Content="Stop" Width="100" Margin="8,0,0,0" Command="{Binding CancelCommand}" IsEnabled="{Binding IsProcessing}" />
|
|
<TextBlock Text="{Binding Status}" Margin="12,4,0,0" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="3">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="2*" />
|
|
<ColumnDefinition Width="3*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Grid.Column="0">
|
|
<DataGrid AutoGenerateColumns="False" IsReadOnly="True" ItemsSource="{Binding Results}" Height="300">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="Filename" Binding="{Binding FileName}" Width="*"/>
|
|
<DataGridTextColumn Header="Text" Binding="{Binding Text}" Width="2*"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
|
|
<ProgressBar Minimum="0" Maximum="100" Value="{Binding ProgressValue, Mode=OneWay}" Height="20" Margin="0,8,0,0" />
|
|
<TextBlock Text="{Binding Status}" Margin="0,6,0,0" />
|
|
<StackPanel Orientation="Horizontal" Margin="0,6,0,0">
|
|
<TextBlock Text="Processed:" FontWeight="Bold"/>
|
|
<TextBlock Text=" " />
|
|
<TextBlock Text="{Binding ProcessedFiles}"/>
|
|
<TextBlock Text=" / " />
|
|
<TextBlock Text="{Binding TotalFiles}"/>
|
|
<TextBlock Text=" " />
|
|
<TextBlock Text="Imgs/sec:" FontWeight="Bold"/>
|
|
<TextBlock Text=" " />
|
|
<TextBlock Text="{Binding ImagesPerSecond, StringFormat=N2}"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
|
|
<!-- Preview removed as requested -->
|
|
</Grid>
|
|
</Grid>
|
|
</Window> |