Learning to categorize objects using temporal coherence