File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
c_sharp/OpenVINO_EP/yolov3_object_detection Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1515using SixLabors . ImageSharp . Formats ;
1616using SixLabors . ImageSharp . Drawing . Processing ;
1717using SixLabors . Fonts ;
18+ using System . Runtime . InteropServices ;
1819
1920namespace yolov3
2021{
@@ -144,7 +145,8 @@ static void Main(string[] args)
144145
145146 // Put boxes, labels and confidence on image and save for viewing
146147 using var outputImage = File . OpenWrite ( outImageFilePath ) ;
147- Font font = SystemFonts . CreateFont ( "FreeMono" , 16 ) ;
148+ // Using FreeMono font for Linux and Arial for others
149+ Font font = ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) ) ? SystemFonts . CreateFont ( "FreeMono" , 16 ) : SystemFonts . CreateFont ( "Arial" , 16 ) ;
148150 foreach ( var p in predictions )
149151 {
150152 imageOrg . Mutate ( x =>
You can’t perform that action at this time.
0 commit comments