Model card for 263703
Browse files
README.md
CHANGED
|
@@ -14,123 +14,109 @@ tags:
|
|
| 14 |
Reads an analog clock and returns the time. Finds the dial with a
|
| 15 |
COCO-pretrained detector, then reads the crop.
|
| 16 |
|
| 17 |
-
>
|
| 18 |
-
>
|
| 19 |
-
>
|
| 20 |
-
> not a
|
|
|
|
| 21 |
|
| 22 |
-
Version
|
| 23 |
|
| 24 |
-
##
|
| 25 |
|
| 26 |
-
|
| 27 |
-
COCO detector finds the dial, the reader reads the crop.
|
| 28 |
-
|
| 29 |
-
| reader | MAE | median | within 1 min | within 5 min | worse than 30 min |
|
| 30 |
|---|---|---|---|---|---|
|
| 31 |
-
|
|
| 32 |
-
|
|
| 33 |
-
|
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
A clock's hands are geared: at time t the hour hand sits at t/720 of a turn and
|
| 60 |
-
the minute hand at (t mod 60)/60 of a turn, so one number fixes both. The reader
|
| 61 |
-
predicts a distribution for each hand, and the decoder searches the 720 minutes
|
| 62 |
-
the clock could be showing for the one that best explains both. It cannot return
|
| 63 |
-
a pair of angles that describes no time, and a confident minute hand can pull a
|
| 64 |
-
vague hour hand onto the right hour.
|
| 65 |
-
|
| 66 |
-
| decoder | MAE | median | within 5 min | worse than 30 min |
|
| 67 |
-
|---|---|---|---|---|
|
| 68 |
-
| each hand read on its own | 35.3 min | 1.4 | 69.0% | 25.5% |
|
| 69 |
-
| search over times the clock could show | 34.0 min | 1.2 | 73.0% | 22.0% |
|
| 70 |
-
|
| 71 |
-
Same weights, same crops, same photographs; only the decoding differs. The gain
|
| 72 |
-
is in readings that were nearly right already, which is why MAE barely moves --
|
| 73 |
-
MAE here is set by the readings that are wrong by hours, and those are wrong in
|
| 74 |
-
the image, not in the decoding.
|
| 75 |
-
|
| 76 |
-
Scoring the hands in each other's roles, to catch the ones read the wrong way
|
| 77 |
-
round, does not work and is off by default. On these photographs the exchanged
|
| 78 |
-
reading scored a median 0.06 better where the hands really were swapped and 0.11
|
| 79 |
-
worse everywhere else -- the two populations sit on top of each other. A swap is
|
| 80 |
-
not two good angles in the wrong slots; the model is confidently wrong about
|
| 81 |
-
both hands at once and they agree on a wrong but perfectly geared time.
|
| 82 |
|
| 83 |
## When to trust a reading
|
| 84 |
|
| 85 |
The reader ranks its own answers, and the ranking is worth more than the
|
| 86 |
-
headline.
|
|
|
|
| 87 |
|
| 88 |
```
|
| 89 |
200 readings. Keeping only the ones each signal is most sure of:
|
| 90 |
|
| 91 |
hand agreement
|
| 92 |
keep n MAE median <=5min
|
| 93 |
-
100% 200
|
| 94 |
-
75% 150 26.
|
| 95 |
-
50% 100
|
| 96 |
-
25% 50
|
| 97 |
-
10% 20
|
| 98 |
-
rank correlation with error +0.
|
| 99 |
|
| 100 |
head sharpness
|
| 101 |
keep n MAE median <=5min
|
| 102 |
-
100% 200
|
| 103 |
-
75% 150
|
| 104 |
-
50% 100
|
| 105 |
-
25% 50 1.
|
| 106 |
-
10% 20
|
| 107 |
-
rank correlation with error -0.
|
| 108 |
|
| 109 |
search margin
|
| 110 |
keep n MAE median <=5min
|
| 111 |
-
100% 200
|
| 112 |
-
75% 150
|
| 113 |
-
50% 100 10.
|
| 114 |
-
25% 50
|
| 115 |
-
10% 20
|
| 116 |
-
rank correlation with error -0.
|
| 117 |
|
| 118 |
A caution on reading the low-coverage rows: at 25% of 200 photographs a row
|
| 119 |
rests on 50 readings, so small differences between signals there are noise.
|
| 120 |
```
|
| 121 |
|
| 122 |
-
The signal this project set out to use for that was
|
| 123 |
-
hands
|
| 124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
## Honest limits
|
| 127 |
|
| 128 |
-
The
|
| 129 |
-
|
| 130 |
-
|
| 131 |
|
| 132 |
-
|
| 133 |
-
|
|
|
|
|
|
|
| 134 |
|
| 135 |
## Licence
|
| 136 |
|
|
|
|
| 14 |
Reads an analog clock and returns the time. Finds the dial with a
|
| 15 |
COCO-pretrained detector, then reads the crop.
|
| 16 |
|
| 17 |
+
> **263703 reads 51.5% of 200 held-out real photographs to the minute**,
|
| 18 |
+
> against 49.0% for 263702. It is also wrong by more than half an hour
|
| 19 |
+
> more often -- 25.5% against 22.0% -- so this is a
|
| 20 |
+
> trade, not a clean win. Which one you want depends on whether a wrong answer
|
| 21 |
+
> costs you more than a missing one. Both are in this repository.
|
| 22 |
|
| 23 |
+
Version 263703, commit `1fce71d`. Reader backbone: `resnet50`.
|
| 24 |
|
| 25 |
+
## The two versions, same 200 photographs, same pipeline
|
| 26 |
|
| 27 |
+
| | to the minute | median | within 5 min | MAE | worse than 30 min |
|
|
|
|
|
|
|
|
|
|
| 28 |
|---|---|---|---|---|---|
|
| 29 |
+
| **263703** | **51.5%** | **1.00 min** | 69.0% | 40.4 min | 25.5% |
|
| 30 |
+
| 263702 | 49.0% | 1.25 min | **73.0%** | **34.0 min** | **22.0%** |
|
| 31 |
+
| guessing | ~0% | 180 min | 3% | 180 min | 97% |
|
| 32 |
+
|
| 33 |
+
The trade has a cause, and it is visible while training. Measured on real
|
| 34 |
+
photographs held out from training, epoch by epoch: readings correct to the
|
| 35 |
+
minute climb from 23.2% to 48.7% across all 22 epochs and never stop climbing,
|
| 36 |
+
while mean error bottoms out at epoch 8 and then gets worse. Training longer
|
| 37 |
+
makes the model sharper on the clocks it can read and less steady on the ones it
|
| 38 |
+
cannot. There is no epoch that is best at both, so the choice is a choice.
|
| 39 |
+
|
| 40 |
+
## What changed
|
| 41 |
+
|
| 42 |
+
**The reader gained a third head.** The other two each describe one hand, so a
|
| 43 |
+
dial whose hands are hard to tell apart corrupts both at once -- on 263702, 27.5%
|
| 44 |
+
of readings got the minute right and the hour wrong. The third head is asked for
|
| 45 |
+
the time itself over the whole 12-hour ring, coarsely, with no notion of a hand:
|
| 46 |
+
it cannot express a role confusion because it never assigns roles, and it only
|
| 47 |
+
has to break the twelve-way tie. In a controlled comparison -- same data, same
|
| 48 |
+
recipe, only the head differing -- it moved exactly what it was aimed at, hours
|
| 49 |
+
missed with the minute correct falling from 12.0% to 8.5%.
|
| 50 |
+
|
| 51 |
+
**The checkpoint is chosen on photographs, not renders.** Renders stop
|
| 52 |
+
predicting real accuracy about a third of the way through training; picking the
|
| 53 |
+
epoch renders liked cost 3 to 7 minutes of real error. It is chosen on
|
| 54 |
+
photographs held out from training and never in this test set, and by the
|
| 55 |
+
to-the-minute rate, because MAE and the to-the-minute rate disagree about which
|
| 56 |
+
epoch is best and only one of them is what this model is for.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
## When to trust a reading
|
| 59 |
|
| 60 |
The reader ranks its own answers, and the ranking is worth more than the
|
| 61 |
+
headline. Declining the quarter it is least sure of takes it from
|
| 62 |
+
69.0% within five minutes to 96%.
|
| 63 |
|
| 64 |
```
|
| 65 |
200 readings. Keeping only the ones each signal is most sure of:
|
| 66 |
|
| 67 |
hand agreement
|
| 68 |
keep n MAE median <=5min
|
| 69 |
+
100% 200 40.40 1.00 69.0%
|
| 70 |
+
75% 150 26.06 1.00 80.0%
|
| 71 |
+
50% 100 15.16 0.75 86.0%
|
| 72 |
+
25% 50 10.31 0.50 90.0%
|
| 73 |
+
10% 20 7.20 0.75 95.0%
|
| 74 |
+
rank correlation with error +0.388 (useful)
|
| 75 |
|
| 76 |
head sharpness
|
| 77 |
keep n MAE median <=5min
|
| 78 |
+
100% 200 40.40 1.00 69.0%
|
| 79 |
+
75% 150 24.20 0.75 80.7%
|
| 80 |
+
50% 100 7.80 0.75 92.0%
|
| 81 |
+
25% 50 1.84 0.75 98.0%
|
| 82 |
+
10% 20 3.55 0.50 95.0%
|
| 83 |
+
rank correlation with error -0.504 (useful)
|
| 84 |
|
| 85 |
search margin
|
| 86 |
keep n MAE median <=5min
|
| 87 |
+
100% 200 40.40 1.00 69.0%
|
| 88 |
+
75% 150 21.12 0.75 82.0%
|
| 89 |
+
50% 100 10.33 0.75 91.0%
|
| 90 |
+
25% 50 5.75 0.50 96.0%
|
| 91 |
+
10% 20 0.57 0.50 100.0%
|
| 92 |
+
rank correlation with error -0.529 (useful)
|
| 93 |
|
| 94 |
A caution on reading the low-coverage rows: at 25% of 200 photographs a row
|
| 95 |
rests on 50 readings, so small differences between signals there are noise.
|
| 96 |
```
|
| 97 |
|
| 98 |
+
The signal this project set out to use for that was disagreement between the
|
| 99 |
+
hands. On weaker readers it ranked almost nothing; it becomes useful here, which
|
| 100 |
+
took a good enough model rather than a better signal.
|
| 101 |
+
|
| 102 |
+
## Stage 1
|
| 103 |
+
|
| 104 |
+
`fasterrcnn_mobilenet_v3_large_fpn` with COCO weights, on CPU, not fine-tuned.
|
| 105 |
+
It finds a clock in 93-96% of real photographs having never seen a render. A
|
| 106 |
+
dial locator trained on renders scored no better than not cropping at all and
|
| 107 |
+
was removed. On the 9 test photographs where stage 1 finds nothing, 1 is still
|
| 108 |
+
read within five minutes.
|
| 109 |
|
| 110 |
## Honest limits
|
| 111 |
|
| 112 |
+
The goal this was pointed at was reading the time to the minute 95% of the time.
|
| 113 |
+
It does not get there: 51.5% across all photographs, and about 90% even
|
| 114 |
+
when allowed to decline 85% of them.
|
| 115 |
|
| 116 |
+
The labels on these 200 photographs are third party. 106 were checked by hand
|
| 117 |
+
against the image; the rest were not. There is no first-party test set, and a
|
| 118 |
+
number measured on somebody else's labels is worth less than one measured on
|
| 119 |
+
your own.
|
| 120 |
|
| 121 |
## Licence
|
| 122 |
|