The post has been translated automatically. Original language: Russian
When you first start working with AI, it seems that the most important question is which model to choose. Especially now, when new versions are appearing literally one after another. I want to take the most modern solution and immediately get the best result. But the more projects that go through the team, the more you realize that choosing a model does not always determine the success of the project. In many cases, the difficulties start in a completely different place.
The data is more important than the model
This is probably the most banal advice you can hear. But it is he who most often turns out to be true.
You can spend several weeks searching for the perfect architecture, and then discover that half of the video was shot at night, the cameras differ in quality, people overlap each other, and part of the dataset is marked up with errors. In such a situation, even the most modern model will not show the quality that is expected of it. But after normal data preparation, the increase in accuracy is much more noticeable than after the next model replacement.
It's not all about accuracy.
When a project is just starting, almost everyone discusses Accuracy, Precision, Recall, or mAP. These are really important indicators, but after the launch they quickly fade into the background. Other questions are emerging.
- How many video streams can the server handle?
- How long will it take to process an hour of video?
- What happens if one of the cameras temporarily stops working?
- How difficult is it to update the model without stopping the entire system?
These are the issues that eventually begin to affect the project much more than the difference of a few percent between the two models.
Scaling is rarely "for later"
Sometimes the system works fine on ten cameras. Then there are fifty. Then a hundred. And here the problems that were previously unnoticeable begin to appear.
- There is not enough graphics card memory;
- The queues are starting to grow;
- Processing time increases;
- We have to revise the architecture of the service;
To be honest, it's better to consider such things right away. Redesigning an already working system is almost always more difficult than designing it normally once.
AI is not just a neural network
That's probably the main conclusion we've come to. When viewed from the outside, it seems that the whole project is about model training. In practice, the training may take only a small part of the entire work. The rest of the time is spent on data preparation, integration, infrastructure, monitoring, testing, updates, and support. Sometimes it turns out that writing the model itself was the easiest step.
After the launch, the work is just beginning
There is a feeling that after a successful launch, the project can be considered completed. In practice, the opposite happens: cameras change, lighting changes, new usage scenarios appear, and the image gets worse or better. Over time, the quality of the model begins to gradually decrease, even if it initially showed excellent results.
Therefore, almost any AI service requires constant monitoring. In some cases, it is enough to periodically check the metrics, in others it is necessary to regularly retrain the model based on new data.
This is a common part of the lifecycle of such systems.
Conclusion
AI has become much more accessible over the past few years. Launching a model is easier today than ever before. But a good AI project is still not built around the model itself. If you pay attention to the data at the beginning, think about scaling in advance and do not forget about operation after launch, the probability of successful implementation becomes much higher.
This is what, as practice shows, most often distinguishes a working system from a beautiful demonstration on a test dataset.
Когда только начинаешь работать с AI, кажется, что самый главный вопрос - какую модель выбрать. Особенно сейчас, когда новые версии появляются буквально одна за другой. Хочется взять самое современное решение и сразу получить лучший результат. Но чем больше проектов проходит через команду, тем сильнее понимаешь - выбор модели далеко не всегда определяет успех проекта. Во многих случаях сложности начинаются совсем в другом месте.
Данные важнее модели
Наверное, это самый банальный совет, который можно услышать. Но именно он чаще всего оказывается правдой.
Можно потратить несколько недель на поиск идеальной архитектуры, а потом обнаружить, что половина видео снята ночью, камеры отличаются по качеству, люди перекрывают друг друга, а часть датасета вообще размечена с ошибками. В такой ситуации даже самая современная модель не покажет того качества, которое от нее ожидают. Зато после нормальной подготовки данных прирост точности бывает намного заметнее, чем после очередной замены модели.
Не все упирается в точность
Когда проект только начинается, почти все обсуждают Accuracy, Precision, Recall или mAP. Это действительно важные показатели, но после запуска они довольно быстро отходят на второй план. Появляются другие вопросы.
- Сколько видеопотоков выдержит сервер?
- За какое время обработается час видео?
- Что произойдет, если одна из камер временно перестанет работать?
- Насколько сложно обновить модель без остановки всей системы?
Именно такие вопросы в итоге начинают влиять на проект гораздо сильнее, чем разница в несколько процентов между двумя моделями.
Масштабирование редко бывает "на потом"
Иногда система отлично работает на десяти камерах. Потом появляется пятьдесят. Затем сто. И вот здесь начинают проявляться проблемы, которые раньше были незаметны.
- Не хватает памяти видеокарты;
- Очереди начинают расти;
- Время обработки увеличивается;
- Приходится пересматривать архитектуру сервиса;
Если честно, подобные вещи лучше учитывать сразу. Переделывать уже работающую систему почти всегда сложнее, чем один раз нормально ее спроектировать.
AI - это не только нейронная сеть
Наверное, это главный вывод, к которому мы пришли. Когда смотришь со стороны, кажется, что весь проект - это обучение модели. На практике обучение может занять лишь небольшую часть всей работы. Остальное время уходит на подготовку данных, интеграцию, инфраструктуру, мониторинг, тестирование, обновления и поддержку. Иногда оказывается, что написать саму модель было самым простым этапом.
После запуска работа только начинается
Есть ощущение, что после успешного запуска проект можно считать завершенным. На практике все происходит наоборот: меняются камеры, меняется освещение, появляются новые сценарии использования, изображение становится хуже или лучше. Со временем качество модели начинает постепенно снижаться, даже если изначально она показывала отличные результаты.
Поэтому почти любой AI-сервис требует постоянного наблюдения. Где-то достаточно периодически проверять метрики, где-то приходится регулярно переобучать модель на новых данных.
Это обычная часть жизненного цикла таких систем.
Заключение
За последние несколько лет AI стал намного доступнее. Запустить модель сегодня проще, чем когда-либо раньше. Но хороший AI-проект по-прежнему строится не вокруг самой модели. Если в начале уделить внимание данным, заранее подумать о масштабировании и не забыть про эксплуатацию после запуска, вероятность успешного внедрения становится значительно выше.
Именно это, как показывает практика, чаще всего и отличает рабочую систему от красивой демонстрации на тестовом наборе данных.