File tree 4 files changed +9
-8
lines changed 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
1
"""Scripts to collect images without running a detection."""
2
2
3
3
import sys
4
+ import os
4
5
5
6
import cv2
6
7
7
- IMG_ADDR = "/home/pi/Desktop/Object Detection/Raspberry Pi"
8
+ IMG_ADDR = str ( os . getcwd ())
8
9
9
10
counter = 0
10
11
Original file line number Diff line number Diff line change 14
14
from utils import vizres , array , plot
15
15
16
16
# Add project directory to path before importing modules
17
- sys .path .insert (0 , "/home/pi/Desktop/Object Detection/Raspberry Pi" )
17
+ sys .path .insert (0 , str ( os . getcwd ()) )
18
18
19
19
20
20
def parse_argument ():
@@ -32,7 +32,7 @@ def parse_argument():
32
32
"--imgPath" ,
33
33
help = "Path of the test images." ,
34
34
required = False ,
35
- default = "/home/pi/Desktop/Object Detection/Raspberry Pi /test_data" ,
35
+ default = str ( os . getcwd ()) + " /test_data" ,
36
36
)
37
37
parser .add_argument (
38
38
"--numThreads" ,
Original file line number Diff line number Diff line change 11
11
from utils import vizres , array , plot
12
12
13
13
# Add project directory to path before importing modules
14
- sys .path .insert (0 , "/home/pi/Desktop/Object Detection/Raspberry Pi" )
14
+ sys .path .insert (0 , str ( os . getcwd ()) )
15
15
16
16
17
17
def parse_argument ():
@@ -30,7 +30,7 @@ def parse_argument():
30
30
"--imgPath" ,
31
31
help = "Path of the test images." ,
32
32
required = False ,
33
- default = "/home/pi/Desktop/Object Detection/Raspberry Pi /test_data" ,
33
+ default = str ( os . getcwd ()) + " /test_data" ,
34
34
)
35
35
parser .add_argument (
36
36
"--csvFilename" ,
Original file line number Diff line number Diff line change 9
9
10
10
11
11
# Define images and parent directory
12
- IMAGE_DIR = r"/home/pi/Desktop/Object Detection/Raspberry Pi/image"
13
- VIDEO_DIR = r"/home/pi/Desktop/Object Detection/Raspberry Pi/video"
14
- PARENT_DIR = r"/home/pi/Desktop/Object Detection/Raspberry Pi"
12
+ PARENT_DIR = str ( os . getcwd ())
13
+ IMAGE_DIR = PARENT_DIR + '/' + 'image'
14
+ VIDEO_DIR = PARENT_DIR + '/' + 'video'
15
15
16
16
17
17
def save_img (
You can’t perform that action at this time.
0 commit comments