marta-marta commited on
Commit
85321d7
·
1 Parent(s): c76e029

Testing how to make data generator application

Browse files
Files changed (1) hide show
  1. 2D_Data_Generator_Model.py +5 -3
2D_Data_Generator_Model.py CHANGED
@@ -17,6 +17,8 @@ from Data_Generation.Shape_Generation_Functions import basic_box, diagonal_box_s
17
  back_slash_box, forward_slash_box, back_slash_plus_box, forward_slash_plus_box, hot_dog_box, hamburger_box, \
18
  x_hamburger_box, x_hot_dog_box, x_plus_box
19
 
 
 
20
  from Data_Generation.Dataset_Generation_Functions import make_boxes
21
 
22
 
@@ -28,8 +30,8 @@ food = load_dataset("cmudrc/2d-lattices", split="train+test") # Loads all of th
28
  # if type(food.features["label"]) != 'datasets.features.features.ClassLabel': # Cast to ClassLabel
29
  # food = food.class_encode_column('label')
30
  print(food)
31
- desired_label = 'x_hot_dog_box'
32
- desired_thickness = 1
33
  desired_density = 1
34
 
35
  data_frame = pd.DataFrame(food)
@@ -60,7 +62,7 @@ all_shapes = [basic_box, diagonal_box_split, horizontal_vertical_box_split, back
60
  x_hot_dog_box, x_plus_box]
61
 
62
  base_shapes = [basic_box, back_slash_box, forward_slash_box, hot_dog_box, hamburger_box]
63
- image_size = 11
64
  density = [1]
65
 
66
  boxes = make_boxes(image_size, density, all_shapes)
 
17
  back_slash_box, forward_slash_box, back_slash_plus_box, forward_slash_plus_box, hot_dog_box, hamburger_box, \
18
  x_hamburger_box, x_hot_dog_box, x_plus_box
19
 
20
+
21
+
22
  from Data_Generation.Dataset_Generation_Functions import make_boxes
23
 
24
 
 
30
  # if type(food.features["label"]) != 'datasets.features.features.ClassLabel': # Cast to ClassLabel
31
  # food = food.class_encode_column('label')
32
  print(food)
33
+ desired_label = 'x_plus_box'
34
+ desired_thickness = 3
35
  desired_density = 1
36
 
37
  data_frame = pd.DataFrame(food)
 
62
  x_hot_dog_box, x_plus_box]
63
 
64
  base_shapes = [basic_box, back_slash_box, forward_slash_box, hot_dog_box, hamburger_box]
65
+ image_size = 256
66
  density = [1]
67
 
68
  boxes = make_boxes(image_size, density, all_shapes)