mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 13:06:31 +00:00
fixed inference bugs
add DONE during inference, correct handling on C# side
This commit is contained in:
@@ -8,6 +8,8 @@ namespace Azaion.Common.DTO.Config;
|
||||
|
||||
public class AppConfig
|
||||
{
|
||||
public ApiConfig ApiConfig { get; set; } = null!;
|
||||
|
||||
public QueueConfig QueueConfig { get; set; } = null!;
|
||||
|
||||
public DirectoriesConfig DirectoriesConfig { get; set; } = null!;
|
||||
|
||||
@@ -31,16 +31,11 @@ public class PythonInferenceService(ILogger<PythonInferenceService> logger, IOpt
|
||||
|
||||
while (true)
|
||||
{
|
||||
byte[] bytes = [];
|
||||
try
|
||||
{
|
||||
var annotationStream = dealer.Get<AnnotationImage>(out bytes);
|
||||
var annotationStream = dealer.Get<AnnotationImage>(bytes => bytes.Length == 4 && Encoding.UTF8.GetString(bytes) == "DONE");
|
||||
if (annotationStream == null)
|
||||
{
|
||||
if (bytes.Length == 4 && Encoding.UTF8.GetString(bytes) == "DONE")
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
||||
await processAnnotation(annotationStream);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user