File: 0001_fix_data_label_path.patch

package info (click to toggle)
darknet 0.0.0%2Bgit20180914.61c9d02e-3
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,528 kB
  • sloc: ansic: 28,478; python: 310; makefile: 115; cpp: 105; xml: 83; sh: 43
file content (18 lines) | stat: -rw-r--r-- 820 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Change label path to /usr/share/darknet
 We install all the necessary data to /usr/share/darknet, not relative
 path.
Author: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Last-Update: 2018-11-27
Index: darknet-0.0.0+git20180914.61c9d02e-1/src/image.c
===================================================================
--- darknet-0.0.0+git20180914.61c9d02e-1.orig/src/image.c
+++ darknet-0.0.0+git20180914.61c9d02e-1/src/image.c
@@ -229,7 +229,7 @@ image **load_alphabet()
         alphabets[j] = calloc(128, sizeof(image));
         for(i = 32; i < 127; ++i){
             char buff[256];
-            sprintf(buff, "data/labels/%d_%d.png", i, j);
+            sprintf(buff, "/usr/share/darknet/data/labels/%d_%d.png", i, j);
             alphabets[j][i] = load_image_color(buff, 0, 0);
         }
     }