Learning to care for
my fish friends.想更好地关心,
我的鱼儿朋友。
FishMood began with my love of keeping fish. I wanted to see whether AI could help me make clearer sense of what I notice about them every day.FishMood 从我对养鱼的兴趣开始。我想试试,能不能用AI,把平时对鱼儿的观察整理得更清楚。
Putting my tank into a web page把我的鱼缸,做进一个网页
I first put the footage and stills on the home page so I can watch them again. Then I built this 3D demo: you can view the tank from any angle, pick a simulated fish, and see what changes after feeding or a disturbance.我先把录像和抽帧放进首页,方便反复回看。随后又做了这个三维演示,可以换角度看鱼缸、选择一条模拟鱼,试试投喂和惊扰后的变化。
A box for each real fish给三条真鱼,各画一个框
The fish in the 3D tank are simulated; I also wanted to recognise each one in real footage. So I picked a daytime clip and tried to follow Shadow, Cherry and Bubbles frame by frame.三维鱼缸里的鱼是模拟的;我也想在真实录像里认出每一条。于是挑了一段白天录像,先试着逐帧跟住阴影、樱桃和泡泡。
Turning an idea into things I could build把一个想法,拆成几件能动手的事
I split the idea into parts: organising the videos, making the website, building the interactive scene, and turning model results into charts I can look back on.我先把想法拆成几个部分:整理视频、制作网页、搭建交互场景,再把模型结果做成可以回看的图表。
Every day after school I upload that day's video, then pick out clips and stills to observe.每天放学后上传当天录制的视频,再整理片段与抽帧,留下可观察素材。
Use a website and a 3D scene to show the idea and try out ways to interact with the tank.用网页和三维场景呈现观察设想,尝试人与鱼缸的交互方式。
Use models to extract behaviour features such as speed, turning and time spent in each zone.借助模型提取鱼的速度、转向、区域停留等行为特征。
Keep logistic regression and a hidden Markov model, compare their judgements, and record where they fail.保留逻辑回归与隐马尔可夫模型,比较判断结果,也记录失败情境。
HFeeding-related摄食相关
Looks at cues such as approaching the feeding area and how much they reveal; it can't confirm hunger or eating.关注靠近喂食区等行为线索,探索它们能提供多少信息;不能据此确认饥饿或进食。
SAlert / avoidant警觉 / 回避
Looks at changes in darting, hiding and avoidance, without reading them directly as illness or distress.关注急冲、躲藏与回避的变化,不把这些表现直接解释为疾病或痛苦。
EExploring探索
Looks at range and swimming routes, to describe how the fish use the space in the tank.关注活动范围与游动路线,尝试描述鱼儿如何使用缸里的空间。
Two models for the analysis用两种模型来尝试做分析
On AI's suggestion, I used logistic regression and a hidden Markov model for the analysis.根据AI的建议使用了逻辑回归与隐马尔可夫模型来做分析。
Logistic regression逻辑回归
A clear, checkable starting point for the project.为项目建立一个清楚、可检查的起点。
I use it to combine the behaviour cues in each observation window into a baseline judgement. It also lets me check which cues are strongly linked to the results and which judgements are still unreliable.我用它把每个观察窗口里的行为线索组合起来,得到一份基础判断。它也让我能够检查:哪些线索与实验结果关联较强,哪些判断还不可靠。
What I use it for我用它做什么
I trained and tested it on the example experiment first, then kept the results to compare with the HMM. You can see the parameters for each dimension and its judgements in different clips.先在示例实验中训练、测试,再把结果保留下来,与 HMM 作比较。页面可以查看每个维度的参数,以及不同片段中的判断结果。
Logistic regression details查看逻辑回归的实验细节
Parameters come from the existing 4-second-window experiment; standardised coefficients show associations in the model, not causal effects of behaviour.参数来自现有 4 秒窗口实验;标准化系数表示模型中的关联,不是行为的因果影响。
Hidden Markov model隐马尔可夫模型
Takes changes over time into account, not just one clip at a time.把前后变化纳入判断,而不只看单个片段。
I use it to compare continuous observation with window-by-window judgement. It combines the previous state probabilities with the current behaviour cues; in the existing experiment this link over time helps, but can also make it slower to react.我用它对照连续观察与逐窗口判断的区别。它会结合上一刻的状态概率与当前行为线索;在现有实验里,这种时间关联有帮助,也可能让判断反应更慢。
What I use it for我用它做什么
I feed the example clips to the model in time order, then review how its judgement changes. The page puts the continuous results in one chart to compare changes and lags; inference never uses future windows.把示例片段按时间顺序交给模型,再回看判断怎样变化。页面把连续结果放在同一张图里,便于比较变化与滞后;推断时不使用未来窗口的信息。
HMM details查看 HMM 的实验细节
A supervised HMM with diagonal Gaussian emissions; transitions come from training-label counts with smoothing.使用有监督、对角高斯发射的 HMM;状态转移来自训练标签计数与平滑。
Some calls were right; many were uncertain有些判断对了,也有很多拿不准
A record that can be checked有一套可复查的记录
This page shows the short-window experiment: 189 windows from 16 independent test clips were evaluated. Data sources, model outputs and failed clips are all kept.本页展示已有短窗口实验:16 段独立测试片段中,189 个窗口进入评估。数据来源、模型结果和失败片段都保留下来。
“I don't know” still matters“不知道”仍然很重要
Feeding-related states were the hardest. Logistic regression gave a conclusion for only 7.9% of windows that cleared the threshold, and the HMM for 2.1%; the rest stay unknown instead of being forced into a confident answer.摄食相关状态最难判断。逻辑回归只有 7.9% 的窗口通过门槛给出结论,HMM 为 2.1%;其余保留为未知,不补成肯定答案。
View test records查看测试记录
A conclusion is given only when the top class probability reaches 0.7. Coverage is the share of windows with a conclusion, and accepted accuracy is computed only on those windows. Lower Brier is better.最大类别概率达到 0.7 才给出结论;接受率是给出结论的比例,接受后准确率仅在这部分窗口上计算。Brier 越低越好。
Trade-offs between the two两种方法的取舍
On S and E, logistic regression gives a conclusion more often; the HMM has higher accepted accuracy (0.885 and 0.938) but concludes less often. High scores and low coverage need to be shown together.S、E 上,逻辑回归给出结论的比例更高;HMM 接受后准确率更高,分别为 0.885 和 0.938,但给出结论更少。高分与低覆盖需要一起呈现。