I want to test video classification result on the trained knn model of labelled videos. All types of videos are labelled and used for training. How can i ttest a random video based on that model?
You can leave some unlabeled instances for testing purpose (i.e., independent test set). Another option, you can use stratified tenfold cross-validation to train and test your algorithm. Otherwise, apply holdout method.
Divide your data into two parts: 90% training and 10% testing for example.
In the training part: you need to pass the features and the labels to your to learn you model (SVM) for example.
In the testing part: you pass only the feature vecotr and the learned model to the prediction function. Then you compare the predicted labels with the ground truth (your available labels) to compute the accuracy.
If you had 100 videos for testing and 80 of them were correctedly predicted and 20% are wrongly predicted that means your accuracy is 80%
To have more roubst results, you can repeate the previous experiments by using different parts of data for training and testing (you will have 10 opitions) compute your accuracy for every time and report the mean and the standard deviation.
As far as I understand Huma, as a part of training you would have created a training set each entry having features extracted from a frame. [say one frame with k clusters each cluster having m features].
Now , you get a frame for testing , simple is sequentially match the frame [(k', m') ] where k' is the clusters of the current frame and m' the features of it.
For a selected frame data (from the training set) if some or all characteristics satisfy the least square technique (arg min (...)) then you found a match.
Now, the complexity in time is HUGE !!!
Also note the values change based on the conditions for capturing hence you must have some frame of reference that is common ...
If you do not want random frames but localized regions within a frame that is fairly easy...
a proper understanding of the training process is required, so that you can process the random video into data representation of the same type as the training videos. unless this is done you will not be able to use the random video to test the KNN model developed.