Skip to content

Commit

Permalink
Merge pull request #60 from lizaalert/dev
Browse files Browse the repository at this point in the history
#0.3.2
  • Loading branch information
gosha20777 authored Nov 13, 2019
2 parents c560744 + 308c7a3 commit 173fe78
Show file tree
Hide file tree
Showing 8 changed files with 325 additions and 20 deletions.
11 changes: 8 additions & 3 deletions DataUtils/LaddGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,17 @@ static void Main(string[] args)
{
Directory.CreateDirectory(annDstPatch);
}
if (!Directory.Exists(spltDstPatch))
{
Directory.CreateDirectory(spltDstPatch);
}

var srcFiles = Directory.GetFiles(annSrcPatch);
var dstImgFileNames = Directory.GetFiles(imgDstPatch);
int count = 0; //420;
int beginCount = 769;
if (dstImgFileNames == null || dstImgFileNames.Length == 0)
count = 0;
count = beginCount;
else
{
count = dstImgFileNames.Length;
Expand All @@ -73,7 +78,7 @@ static void Main(string[] args)
if (dstAnnotation.Objects == null || dstAnnotation.Objects.Count <= 0)
{
dstAnnotation.Objects = new List<Object>();
throw new Exception("no objects in the image!");
//throw new Exception("no objects in the image!");
}
foreach (var obj in dstAnnotation.Objects)
{
Expand All @@ -93,7 +98,7 @@ static void Main(string[] args)

Console.Write($"Shuffling {count-1} files");
List<int> files = new List<int>();
for (int i = 0; i < count; i++)
for (int i = beginCount; i < count; i++)
{
files.Add(i);
}
Expand Down
4 changes: 4 additions & 0 deletions RescuerLaApp/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="RescuerLaApp.App">
<Application.Styles>
<StyleInclude Source="avares://Material.Avalonia/Material.Avalonia.DeepPurple.xaml" />
<StyleInclude Source="avares://Material.Avalonia/Material.Avalonia.Templates.xaml" />
<!--
<StyleInclude Source="resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default"/>
<StyleInclude Source="resm:Avalonia.Themes.Default.Accents.BaseLight.xaml?assembly=Avalonia.Themes.Default"/>
-->
</Application.Styles>
</Application>
9 changes: 9 additions & 0 deletions RescuerLaApp/Models/BoundBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class BoundBox
private int _y;
private int _height;
private int _width;
private bool _isVisible;
private readonly int _xBase;
private readonly int _yBase;
private readonly int _heightBase;
Expand All @@ -21,6 +22,7 @@ public BoundBox(int x, int y, int height, int width)
_y = _yBase = y;
_width = _widthBase = width;
_height = _heightBase = height;
_isVisible = true;
}

public List<Point> Points
Expand All @@ -34,6 +36,13 @@ public List<Point> Points
return new List<Point>() {p1, p3, p4, p2};
}
}

public bool IsVisible
{
get => _isVisible;
set => _isVisible = value;
}

public int X
{
get => _x;
Expand Down
1 change: 1 addition & 0 deletions RescuerLaApp/Models/Frame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public List<BoundBox> Rectangles
public int Height { get; private set; }

public bool IsVisible { get; set; } = false;
public bool IsFavorite { get; set; } = false;

public delegate void MethodContainer();

Expand Down
2 changes: 1 addition & 1 deletion RescuerLaApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal static class Program
{
private static void Main(string[] args)
{
Console.WriteLine("Lacmus desktop application. Version 0.3.2-preview alpha. \nCopyright (c) 2019 Georgy Perevozghikov <[email protected]>\nGithub page: https://github.com/lizaalert/lacmus/.\nProvided by Yandex Cloud: https://cloud.yandex.com/.");
Console.WriteLine("Lacmus desktop application. Version 0.3.2 alpha. \nCopyright (c) 2019 Georgy Perevozghikov <[email protected]>\nGithub page: https://github.com/lizaalert/lacmus/.\nProvided by Yandex Cloud: https://cloud.yandex.com/.");
Console.WriteLine("This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.");
Console.WriteLine("This is free software, and you are welcome to redistribute it\nunder certain conditions; type `show c' for details.");
Console.WriteLine("------------------------------------");
Expand Down
1 change: 1 addition & 0 deletions RescuerLaApp/RescuerLaApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<PackageReference Include="Avalonia.ReactiveUI" Version="0.9.0-preview6" />
<PackageReference Include="Avalonia.Skia.Linux.Natives" Version="1.68.0.2" />
<PackageReference Include="Docker.DotNet" Version="3.125.2" />
<PackageReference Include="Material.Avalonia" Version="0.1.0-preview3" />
<PackageReference Include="MessageBox.Avalonia" Version="0.9.0-preview5" />
<PackageReference Include="MetadataExtractor" Version="2.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="3.0.0" />
Expand Down
Loading

0 comments on commit 173fe78

Please sign in to comment.