CV2015. Лекция 2. Простые методы распознавания изображений.Anton Konushin
Курс "Введение в компьютерное зрение", читаемый на
ВМК МГУ имени М.В. Ломоносова в весеннем семестре 2015 года. Лектор - Конушин Антон. Лекция 2. Простые методы распознавания изображений. Рассматриваются методы бинаризации изображений, основы математической морфологии, медианная фильтрация, выделение связанных компонент, метод последовательного сканирования, метод К-средних, оценка характеристик сегментов.
CV2015. Лекция 2. Простые методы распознавания изображений.Anton Konushin
Курс "Введение в компьютерное зрение", читаемый на
ВМК МГУ имени М.В. Ломоносова в весеннем семестре 2015 года. Лектор - Конушин Антон. Лекция 2. Простые методы распознавания изображений. Рассматриваются методы бинаризации изображений, основы математической морфологии, медианная фильтрация, выделение связанных компонент, метод последовательного сканирования, метод К-средних, оценка характеристик сегментов.
The document discusses concurrency and synchronization in distributed computing. It provides an overview of Petr Kuznetsov's research at Telecom ParisTech, which includes algorithms and models for distributed systems. Some key points discussed are:
- Concurrency is important due to multi-core processors and distributed systems being everywhere. However, synchronization between concurrent processes introduces challenges.
- Common synchronization problems include mutual exclusion, readers-writers problems, and producer-consumer problems. Tools for synchronization include semaphores, transactional memory, and non-blocking algorithms.
- Characterizing distributed computing models and determining what problems can be solved in a given model is an important area of research, with implications for distributed system design.
The document discusses weakly supervised learning from video and images using convolutional neural networks. It describes using scripts as weak supervision for learning actions from movies without explicit labeling. Methods are presented for jointly learning actors and actions from scripts, and for action learning with ordering constraints. The use of CNNs for object and action recognition in images is also summarized, including work on training CNNs using only image-level labels without bounding boxes.
This document discusses common C++ bugs and tools to find them. It describes various types of memory access bugs like buffer overflows on the stack, heap, and globals that can lead to crashes or security vulnerabilities. Threading bugs like data races, deadlocks, and race conditions on object destruction are also covered. Other undefined behaviors like initialization order issues, lack of sequence points, and integer overflows are explained. The document provides examples of each type of bug and emphasizes that undefined behavior does not guarantee a predictable result. It concludes with a quiz to find bugs in a code sample and links to additional reading materials.
AddressSanitizer, ThreadSanitizer, and MemorySanitizer are compiler-based tools that detect bugs like buffer overflows, data races, and uninitialized memory reads in C/C++ programs. AddressSanitizer instruments loads and stores to detect out-of-bounds memory accesses. ThreadSanitizer intercepts synchronization calls to detect data races between threads. MemorySanitizer tracks initialized and uninitialized memory using shadow memory to find uses of uninitialized values. The tools have found thousands of bugs with low overhead. Future work includes supporting more platforms and languages and detecting additional bug classes.
This document discusses common C++ bugs and tools to find them. It describes various types of memory access bugs like buffer overflows on the stack, heap, and globals that can lead to crashes or security vulnerabilities. Threading bugs like data races, deadlocks, and race conditions on object destruction are also covered. Other undefined behaviors like initialization order issues, lack of sequence points, and integer overflows are explained. The document provides examples of each type of bug and quizzes the reader to find bugs in a code sample. It recommends resources for further reading on debugging techniques and thread sanitizers that can detect races and data races.
This document provides examples and snippets of code for MapReduce, Pig, Hive, Spark, Shark, and Disco frameworks. It also includes two sections of references for related papers and Disco documentation. The examples demonstrate basic MapReduce jobs with drivers, mappers, and reducers in Java, Pig and Hive queries, Spark and Shark table operations, and a Disco MapReduce job.
The document discusses concurrency and synchronization in distributed computing. It provides an overview of Petr Kuznetsov's research at Telecom ParisTech, which includes algorithms and models for distributed systems. Some key points discussed are:
- Concurrency is important due to multi-core processors and distributed systems being everywhere. However, synchronization between concurrent processes introduces challenges.
- Common synchronization problems include mutual exclusion, readers-writers problems, and producer-consumer problems. Tools for synchronization include semaphores, transactional memory, and non-blocking algorithms.
- Characterizing distributed computing models and determining what problems can be solved in a given model is an important area of research, with implications for distributed system design.
The document discusses weakly supervised learning from video and images using convolutional neural networks. It describes using scripts as weak supervision for learning actions from movies without explicit labeling. Methods are presented for jointly learning actors and actions from scripts, and for action learning with ordering constraints. The use of CNNs for object and action recognition in images is also summarized, including work on training CNNs using only image-level labels without bounding boxes.
This document discusses common C++ bugs and tools to find them. It describes various types of memory access bugs like buffer overflows on the stack, heap, and globals that can lead to crashes or security vulnerabilities. Threading bugs like data races, deadlocks, and race conditions on object destruction are also covered. Other undefined behaviors like initialization order issues, lack of sequence points, and integer overflows are explained. The document provides examples of each type of bug and emphasizes that undefined behavior does not guarantee a predictable result. It concludes with a quiz to find bugs in a code sample and links to additional reading materials.
AddressSanitizer, ThreadSanitizer, and MemorySanitizer are compiler-based tools that detect bugs like buffer overflows, data races, and uninitialized memory reads in C/C++ programs. AddressSanitizer instruments loads and stores to detect out-of-bounds memory accesses. ThreadSanitizer intercepts synchronization calls to detect data races between threads. MemorySanitizer tracks initialized and uninitialized memory using shadow memory to find uses of uninitialized values. The tools have found thousands of bugs with low overhead. Future work includes supporting more platforms and languages and detecting additional bug classes.
This document discusses common C++ bugs and tools to find them. It describes various types of memory access bugs like buffer overflows on the stack, heap, and globals that can lead to crashes or security vulnerabilities. Threading bugs like data races, deadlocks, and race conditions on object destruction are also covered. Other undefined behaviors like initialization order issues, lack of sequence points, and integer overflows are explained. The document provides examples of each type of bug and quizzes the reader to find bugs in a code sample. It recommends resources for further reading on debugging techniques and thread sanitizers that can detect races and data races.
This document provides examples and snippets of code for MapReduce, Pig, Hive, Spark, Shark, and Disco frameworks. It also includes two sections of references for related papers and Disco documentation. The examples demonstrate basic MapReduce jobs with drivers, mappers, and reducers in Java, Pig and Hive queries, Spark and Shark table operations, and a Disco MapReduce job.
2. • Н.с. в Лаборатории компьютерной
графики и мультимедиа ВМК МГУ имим.
М.В. Ломоносова
• И.о. м.н.с. НИИ Нормальной физиологии
РАМН им. П.К. Анохина
• С/к «Компьютерное зрение» (год), ВМК
• С/к «Анализ изображений и видео»
(год), ШАД Яндекс
• Задавать вопросы по ходу можно и
нужно!
!
4. Задача компьютерного зрения
• Понять, что запечатлено на изображении
• Вариант:
• принятие решений о реальных физических объектах и
сценах, основываясь на воспринимаемых изображениях
• Что это в действительности обозначает?
• Зрение - источник семантической информации о мире
• Зрение - источник метрической информации о
трехмерном мире
7. Поиск и локализация объектов
sky
building
flag
face
banner
wall
street lamp
bus bus
22.12.2010 cars
Slide credit: Fei-Fei, Fergus & Torralba Slide 7
8. Качественная информация об объектах
slanted
non-rigid moving
i id i
object
vertical
rigid moving rigid moving
object object
22.12.2010
horizontal Slide 8
slide credit: Fei-Fei, Fergus
9. Метрическая информация
Multi-view stereo for
Real-time stereo Structure from motion community photo collections
yp
NASA Mars Rover
Pollefeys et al. Goesele et al.
29. Резюме
• Зрение изначально нечеткая задача
• Разные 3D сцены дают одно и то же 2D изображение
• Необходимы априорные знания о структуре и свойствах мира
Image source: F. D
30. Начало
• Работы Дэвида Марра, 1970х
• «Primal sketch»
• Низкоуровневые («low-level») свойства изображения:
направленные края, отрезки и т.д.
• «2.5D sketch»
• Упорядочивание по глубине (бинокулярное стерое), учёт
текстуры и т.д.
е с р
• «3D model»
• Распознавание объектов и представление о 3х мерном
мире
32. Зрение человека
• Д
Данные (D t )
(Data)
• Устройство глаза
• Данные в жизни
• Признаки (Features)
• Low-level vision
Low level
• (?) Стерео, группировка, форма
• Mid-level vision
• Распознавание (Классификация)
• High-level vision
33. Камера-обскура
Камера-обскура:
• Захватывает пучок лучей, проходящих через одну точку
• Точка называется Центр проекции (фокальная точка / focal
point)
• Изображение формируется на картинной плоскости (Image
plane)
Slide by Steve Seitz
35. Человеческий глаз
cone
rod
Глаз как камера!
• Хрусталик – «линза», меняет форму под действием мышц
ру ф р у
• Зрачок - дырка (апертура), диаметр управляется радужкой
– Радужка – цветная пленка с радиальными мышцами
• М
Матрица - К
Клетки-фоторецепторы на сетчатке
ф
Slide by Steve Seitz
37. Что такое цвет?
Цвет – это психологическое свойство нашего зрения,
возникающее при наблюдении объектов и света, а не
физические свойства объектов и света (S Palmer Vision
(S. Palmer,
Science: Photons to Phenomenology)
Цвет – это результат взаимодействия света, сцены и нашей
зрительной системы
Wassily Kandinsky (1866-1944), Murnau Street with Women, 1908 Slide by S. Lazebnik
38. Восприятие цвета
M L
Power
S
Wavelength
Палочки и колбочки (3 вида) – фильтры спектра
• Спектр света умножается на кривую отклика
фоторецептора, производится интегрирование по всем
длинам волн
– Каждая колбочка даёт 1 число
• В: Как же мы можем описать весь спектр 3мя числами?
• О: Мы и не можем! Большая часть информации теряется.
ф р ц р
– Два разных спектра могут быть неотличимы
» Такие спектры называются метамеры
Slide by Steve Seitz
40. Трихроматическая теория
В экспериментах по сопоставлению цвета
большинству людей достаточно 3х основных
цветов, чтобы сопоставить любой цвет
• Основные цвета должны быть независимы
Для одного и того же спектра, и одних и тех же
основных цветов, люди выбирают одинаковые
веса
• Исключения: цветовая слепота
Трихроматическая теория
• Трех чисел оказывается достаточно, чтобы описать цвет
• История восходит к 18у веку (Томас Юнг)
Slide by S. Lazebnik
41. Первые цветные фотографии
Сергей Прокудин-Горский (1863-1944)
Фотографии Российской империи(1909-
р ф р (
1916)
Lantern
projector
http://en.wikipedia.org/wiki/Sergei_Mikhailovich_Prokudin-Gorskii
http://www.loc.gov/exhibits/empire/ Slide by А.Efros
45. Плотность палочек и колбочек
pigment
cone molecules
rod
Палочки и колбочки распределены неравномерно
• Палочки измеряют яркость, колбочки цвет
• Fovea – маленькая область(1 or 2°) в центре визуального поля с
( ) ц р у
наибольшей плотностью колбочек и без палочек
• На периферии все больше палочек подсоединены к одному нейрону
Slide by Steve Seitz
48. Адаптация зрительной системы
Чувствительность зрительной системы меняется в
зависимости от доминантной освещенности
наблюдаемой сцены (Баланс белого)
б й (Б б )
• Механизм плохо изучен
Адаптация к разным уровням освещенности
• Размер зрачка регулирует объем света, попадающий на
сетчатку
• Р
Размер резко меняется при входе в здание с ярко
освещенной солнцем улицы
Ц
Цветовая адаптация
• Клетки сетчатки меняю свою чувствительность
• Пример: если доля красного в освещении повышается,
понижается чувствительность клеток, отвечающий за
клеток
красный, пока вид сцены не придет к норме
• Мы лучше адаптируемся при яркой освещенности, при
освещении свечой все остается в желтых тонах
http://www.schorsch.com/kbase/glossary/adaptation.html Slide by S. Lazebnik
49. Баланс белого
• Когда мы смотрим на фотографию или монитор, глаза
адаптируются к освещению в комнате, а не к освещению сцены на
фотографии
• Если баланс белого неточен, цвета фотографии кажутся
неестественными
incorrect white balance correct white balance
http://www.cambridgeincolour.com/tutorials/white-balance.htm Slide by S. Lazebnik
52. Данные - продолжение
• Сколько нам нужно данных для обучения
алгоритмов?
• Сколько есть классов объектов?
• Сколько изображений?
• Что мы про них будем знать?
53. Сколько всего классов объектов?
1500-3000
1500 3000 основных существительных, ~10 подкатегорий
10 й
Biederman 1987
55. 10 в степени
Число картинок на диске: 104
Число картинок, виденных за 10 лет:
Ч 108
(3 images/second * 60 * 60 * 16 * 365 * 10 = 630720000)
Число картинок,
виденных всем человечеством: 1020
106,456,367,669 humans1 * 60 years * 3 images/second * 60 * 60 * 16 * 365 =
1f
from htt //
http://www.prb.org/Articles/2002/HowManyPeopleHaveEverLivedonEarth.aspx
b /A ti l /2002/H M P l H E Li d E th
Число картинок во вселенной: 10243
1081 atoms * 1081 * 1081 =
Число всех картинок 32x32 : 107373
256 32*32*3 ~ 107373
Slide by Antonio Torralba
56. Доступные данные
Number
of
pictures
1020 Human Click Limit
(all humanity t ki
( ll h it taking
one picture/second
COREL during 100 years)
1015 Lena
a dataset in one picture
1010
2 billion
105
40.000
100
1972 1996 2007 2020? Time
Slide by Antonio Torralba
57. Крошки-картинки (Tiny images)
A. Torralba, R. Fergus, W. T.
A Torralba R Fergus W T Freeman 80 million tiny images: a large dataset for
non-parametric object and scene recognition IEEE Transactions on Pattern
Analysis and Machine Intelligence, vol.30(11), pp. 1958-1970, 2008.
65. Поиск по громадной коллекции
SSD метрика для сравнения изображений
DSSD =
2
∑ ( I1 ( x , y , c ) − I 2 ( x , y , c )) 2
x , y ,c
Для ускорения поиска используем индексацию
по первым 19 главным компонентам всей
коллекции 80М изображений
DSSD = ∑ ( v1 ( n ) − v2 ( n )) 2
ˆ2
n
Отдельно расчет, сколько
приблизительных M изображений нужно
выбрать, чтобы найти N 50 точных
б б й N=50
ближайших (график)
Выбираем 16000 по приближенной
р р
метрики, внутри сравниваем точно
66.
67. Более сложные метрики
Dwarp = min ∑ ( I1 ( x, y , c ) − Tθ I 2 ( x, y , c )) 2
2
p
θ
x , y ,c
69. Анализ коллекции
Вероятность найти соседа, с Вероятность того, что
корреляцией больше 0.8 или изображения отнесены к
0.9 в зависимости от одной категории в
размера коллекции зависимости от корреляции
75. The PASCAL Visual Object Classes Challenge
(2005-2009)
• Основные конкурсы
• Классификация: Для каждого из 20 классов, определить
присутствие/отсутствие объекта этого класса в изображении
/ б б
• Поиск: Определить рамку и метку каждого объекта из 20
классов в изображении
р
http://pascallin.ecs.soton.ac.uk/challenges/VOC/
76. The PASCAL Visual Object Classes Challenge
(2005-2009)
• Новые конкурсы
• Семантическая
сегментация:
попиксельная
аннотация области
объектов и фона
• Человек: Пометить
рамкой и меткой
каждую часть тела
(
(голову, ру , ступни)
у, руки, у )
78. Mechanical Turk
Workers
Task: Dog?
Broker Answer: Yes
Pay: $0 01
$0.01
Is this a dog?
o Yes www.mturk.com
o No Task
as
$0.01
79. Life of a Turker
1. Go to mturk.com
2. Find a HIT
3. Accept it
4. Do work
5. Submit work
6. Wait for approval
7. Get paid
80. Life of a Requester
1. Design the task interface
2. Prepare data
p
3. Publish HITs
4. Wait for assignments
5. Approve(Reject) assignments
6. Post more HITs
81. Annotation language
• Common annotation types
• Polygons
• Bounding boxes
• Segmentations
• Stick fi
Sti k figure/graphs
/ h
• Recursion
QuickTime™ and a
TIFF (Uncompressed) decompressor
are needed to see this picture.
82. Require qualification
• Qualification is a test that a worker has to pass to work on the tasks
Please read the detailed instructions to learn how to
perform the task. Please confirm that you understand the
instructions by answering the following questions:
Which of the following checboxes are correct for this
annotation?
No people
(there are people in the image)
> 20 people
(there are more than 20 people of appropriate size)
Small heads
(there are unmarked small heads in the image)
Task: Put a box around every head
83. Ideal task properties
• Easy cognitive task
Good: Where is the car? (bounding box)
Good: How many cars are there? (3)
Bad: How many cars are there? (132)
• Low amount of input required
Good: few clicks or a couple words
Bad: detailed outlines of all objects (100s of control points)
“Sometimes, Mturk hits requiring many words are not worth the effort to
complete ” From Singapore
complete. From Singapore
• Well-defined task
Good: Locate the corners of the eyes.
Bad: L b l j i t locations (l
B d Label joint l ti (low resolution, close-up i
l ti l images) )
• Concise definition
Good: 1-2 paragraphs, fixed for all tasks
Good: Lots of images
Bad: 300 pages annotation manual
Bad: Similarly-looking, but different tasks
84. M
ar
20
08
N (I
ov pe
0
10
20
30
40
50
60
70
80
90
20 iro
08 tis
(I )
pe
M iro
ay
tis
20 )
09
Au (R
g os
20 s)
09
N (R
ov os
20 s)
Fe 09
b
Who are the Turkers?
20 (R
10 os
s)
M (I
ay pe
20 iro
10 tis
)
(J
oh
n
Le
)
US
India
US
Other
India
Other
85. Income level comparison
• Turk pay ~ $2/hr
• Minimum salary in India ~ $6/day
• Maximum work week in India ~ 48 hrs
2*48*48 = $4608 per worker
Average annual earnings in India - $
$1733