chiyoi commited on
Commit
24a05f6
1 Parent(s): b0414c0
configuration.py CHANGED
@@ -22,7 +22,7 @@ class Config:
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
 
 
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
 
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 keras.layers.Dense(config.num_classes, activation='softmax')
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 model
38
 
39
  def build_model(movinet, classifier_head):
40
  return keras.models.Sequential([movinet, classifier_head])
weights/{classifier-8-epoch10.keras → classifier-16-epoch9.keras} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c11a51f095a4902755f375740980537257764536bd089d2ae7cbe1cbb8343184
3
- size 38477915
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:822441184b3bc06eba5a6dfe82e8c7a5a1a07e5176723ea41c55f9b2bd63d547
3
+ size 38525963