Skip to content

Commit 4ba357b

Browse files
committed
rename folders "sample_" -> "data-"
1 parent 86d76e7 commit 4ba357b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+68
-68
lines changed

Diff for: README.md

+11-11

Diff for: sample_images/1.jpg renamed to data-images/1.jpg

File renamed without changes.

Diff for: sample_images/2.jpg renamed to data-images/2.jpg

File renamed without changes.

Diff for: sample_images/3.jpg renamed to data-images/3.jpg

File renamed without changes.

Diff for: sample_images/4.jpg renamed to data-images/4.jpg

File renamed without changes.

Diff for: sample_images/5.jpg renamed to data-images/5.jpg

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: imageai/Detection/Custom/CUSTOMDETECTION.md

+9-9

Diff for: imageai/Detection/Custom/CUSTOMVIDEODETECTION.md

+3-3

Diff for: imageai/Detection/Custom/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ def setDataDirectory(self, data_directory):
8585
8686
'setDataDirectory()' is required to set the path to which the data/dataset to be used for
8787
training is kept. The directory can have any name, but it must have 'train' and 'validation'
88-
sub-directory. In the 'train' and 'validation' sub-directories, there must be 'sample_images' and 'annotations'
89-
sub-directories respectively. The 'sample_images' folder will contain the pictures for the dataset and the
88+
sub-directory. In the 'train' and 'validation' sub-directories, there must be 'data-images' and 'annotations'
89+
sub-directories respectively. The 'data-images' folder will contain the pictures for the dataset and the
9090
'annotations' folder will contain the XML files with details of the annotations for each image in the
9191
'images folder'.
9292
@@ -115,9 +115,9 @@ def setDataDirectory(self, data_directory):
115115
:return:
116116
"""
117117

118-
self.__train_images_folder = os.path.join(data_directory, "train/sample_images/")
118+
self.__train_images_folder = os.path.join(data_directory, "train/data-images/")
119119
self.__train_annotations_folder = os.path.join(data_directory, "train/annotations/")
120-
self.__validation_images_folder = os.path.join(data_directory, "validation/sample_images/")
120+
self.__validation_images_folder = os.path.join(data_directory, "validation/data-images/")
121121
self.__validation_annotations_folder = os.path.join(data_directory, "validation/annotations/")
122122

123123
if os.path.exists(os.path.join(data_directory, "cache")) == False:

Diff for: imageai/Detection/README.md

+15-15

Diff for: imageai/Detection/VIDEO.md

+5-5

Diff for: imageai/Detection/keras_retinanet/callbacks/eval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(self, generator, iou_threshold=0.5, score_threshold=0.05, max_detec
2727
iou_threshold : The threshold used to consider when a detection is positive or negative.
2828
score_threshold : The score confidence threshold to use for detections.
2929
max_detections : The maximum number of detections to use per image.
30-
save_path : The path to save sample_images with visualized detections to.
30+
save_path : The path to save images with visualized detections to.
3131
tensorboard : Instance of keras.callbacks.TensorBoard used to log the mAP value.
3232
verbose : Set the verbosity level, by default this is set to 1.
3333
"""

Diff for: imageai/Detection/keras_retinanet/preprocessing/coco.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ def image_aspect_ratio(self, image_index):
7979

8080
def load_image(self, image_index):
8181
image_info = self.coco.loadImgs(self.image_ids[image_index])[0]
82-
path = os.path.join(self.data_dir, 'sample_images', self.set_name, image_info['file_name'])
82+
path = os.path.join(self.data_dir, 'data-images', self.set_name, image_info['file_name'])
8383
return read_image_bgr(path)
8484

8585
def load_annotations(self, image_index):
8686
# get ground truth annotations
8787
annotations_ids = self.coco.getAnnIds(imgIds=self.image_ids[image_index], iscrowd=False)
8888
annotations = np.zeros((0, 5))
8989

90-
# some sample_images appear to miss annotations (like image with id 257034)
90+
# some images appear to miss annotations (like image with id 257034)
9191
if len(annotations_ids) == 0:
9292
return annotations
9393

Diff for: imageai/Detection/keras_retinanet/preprocessing/generator.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def preprocess_group(self, image_group, annotations_group):
156156
return image_group, annotations_group
157157

158158
def group_images(self):
159-
# determine the order of the sample_images
159+
# determine the order of the images
160160
order = list(range(self.size()))
161161
if self.group_method == 'random':
162162
random.shuffle(order)
@@ -173,7 +173,7 @@ def compute_inputs(self, image_group):
173173
# construct an image batch object
174174
image_batch = np.zeros((self.batch_size,) + max_shape, dtype=keras.backend.floatx())
175175

176-
# copy all sample_images to the upper left part of the image batch object
176+
# copy all images to the upper left part of the image batch object
177177
for image_index, image in enumerate(image_group):
178178
image_batch[image_index, :image.shape[0], :image.shape[1], :image.shape[2]] = image
179179

@@ -218,7 +218,7 @@ def compute_targets(self, image_group, annotations_group):
218218
return [regression_batch, labels_batch]
219219

220220
def compute_input_output(self, group):
221-
# load sample_images and annotations
221+
# load images and annotations
222222
image_group = self.load_image_group(group)
223223
annotations_group = self.load_annotations_group(group)
224224

Diff for: imageai/Detection/keras_retinanet/preprocessing/kitti.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(
4646
self.base_dir = base_dir
4747

4848
label_dir = os.path.join(self.base_dir, subset, 'labels')
49-
image_dir = os.path.join(self.base_dir, subset, 'sample_images')
49+
image_dir = os.path.join(self.base_dir, subset, 'images')
5050

5151
"""
5252
1 type Describes the type of object: 'Car', 'Van', 'Truck',

Diff for: imageai/Detection/keras_retinanet/preprocessing/open_images.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def generate_images_annotations_json(main_dir, metadata_dir, subset, cls_index):
7777

7878
cls_id = cls_index[class_name]
7979

80-
img_path = os.path.join(main_dir, 'sample_images', subset, frame + '.jpg')
80+
img_path = os.path.join(main_dir, 'images', subset, frame + '.jpg')
8181
if frame in images_sizes:
8282
width, height = images_sizes[frame]
8383
else:
@@ -130,7 +130,7 @@ def __init__(
130130
fixed_labels=False,
131131
**kwargs
132132
):
133-
self.base_dir = os.path.join(main_dir, 'sample_images', subset)
133+
self.base_dir = os.path.join(main_dir, 'images', subset)
134134
metadata_dir = os.path.join(main_dir, version)
135135
annotation_cache_json = os.path.join(annotation_cache_dir, subset + '.json')
136136

Diff for: imageai/Detection/keras_retinanet/utils/coco_eval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def evaluate_coco(generator, model, threshold=0.05):
6262
# append detection to results
6363
results.append(image_result)
6464

65-
# append image to list of processed sample_images
65+
# append image to list of processed images
6666
image_ids.append(generator.image_ids[index])
6767

6868
# print progress

Diff for: imageai/Detection/keras_retinanet/utils/eval.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ def _get_detections(generator, model, score_threshold=0.05, max_detections=100,
6262
all_detections[num_images][num_classes] = detections[num_detections, 4 + num_classes]
6363
6464
# Arguments
65-
generator : The generator used to run sample_images through the model.
66-
model : The model to run on the sample_images.
65+
generator : The generator used to run images through the model.
66+
model : The model to run on the images.
6767
score_threshold : The score confidence threshold to use.
6868
max_detections : The maximum number of detections to use per image.
69-
save_path : The path to save the sample_images with visualized detections to.
69+
save_path : The path to save the images with visualized detections to.
7070
# Returns
7171
A list of lists containing the detections for each image in the generator.
7272
"""
@@ -164,7 +164,7 @@ def evaluate(
164164
iou_threshold : The threshold used to consider when a detection is positive or negative.
165165
score_threshold : The score confidence threshold to use for detections.
166166
max_detections : The maximum number of detections to use per image.
167-
save_path : The path to save sample_images with visualized detections to.
167+
save_path : The path to save images with visualized detections to.
168168
# Returns
169169
A dict mapping class names to mAP scores.
170170
"""

0 commit comments

Comments
 (0)