chiyoi commited on
Commit
acfc7fb
1 Parent(s): e3941dc
configuration.py CHANGED
@@ -1,6 +1,6 @@
1
  class Config:
2
  num_frames = 8
3
- frame_step = 5
4
  resolution = 224
5
  frame_size = (resolution, resolution)
6
  id_to_name = {
@@ -22,7 +22,7 @@ class Config:
22
 
23
  model_id = 'a0'
24
  detector_path = 'weights/yolov8n.pt'
25
- classifier_path = 'weights/classifier-16-epoch9.keras'
26
  num_classes = len(id_to_name)
27
  input_shape = (1, num_frames, resolution, resolution, 3)
28
 
 
1
  class Config:
2
  num_frames = 8
3
+ frame_step = 15
4
  resolution = 224
5
  frame_size = (resolution, resolution)
6
  id_to_name = {
 
22
 
23
  model_id = 'a0'
24
  detector_path = 'weights/yolov8n.pt'
25
+ classifier_path = 'weights/classifier-8-epoch10.keras'
26
  num_classes = len(id_to_name)
27
  input_shape = (1, num_frames, resolution, resolution, 3)
28
 
model.py CHANGED
@@ -31,10 +31,10 @@ def build_movinet(output_size, config: Config):
31
  return model
32
 
33
  def build_classifier_head(input_size, config: Config):
34
- inputs = keras.Input(shape=(input_size,))
35
- classifier = AttentionDenseClassifierHead(2, config.num_classes)(inputs)
36
- model = keras.Model(inputs=inputs, outputs=classifier)
37
- return model
38
 
39
  def build_model(movinet, classifier_head):
40
  return keras.models.Sequential([movinet, classifier_head])
 
31
  return model
32
 
33
  def build_classifier_head(input_size, config: Config):
34
+ # inputs = keras.Input(shape=(input_size,))
35
+ # classifier = AttentionDenseClassifierHead(2, config.num_classes)(inputs)
36
+ # model = keras.Model(inputs=inputs, outputs=classifier)
37
+ return keras.Layers.Dense(config.num_classes, activation='softmax')
38
 
39
  def build_model(movinet, classifier_head):
40
  return keras.models.Sequential([movinet, classifier_head])
weights/classifier-8-epoch10.keras ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c11a51f095a4902755f375740980537257764536bd089d2ae7cbe1cbb8343184
3
+ size 38477915