Object detection with intraclass variations is challenging. The existing methods have not achieved the optimal combinations of classifiers and features, especially features learned by convolutional neural networks (CNNs). To solve this problem, we propose an object-detection method based on improved random forest and local image patches represented by CNN features. First, we compute CNN-based patch descriptors for each sample by modified CNNs. Then, the random forest is built whose split functions are defined by patch selector and linear projection learned by linear support vector machine. To improve the classification accuracy, the split functions in each depth of the forest make up a local classifier, and all local classifiers are assembled in a layer-wise manner by a boosting algorithm. The main contributions of our approach are summarized as follows: (1) We propose a new local patch descriptor based on CNN features. (2) We define a patch-based split function which is optimized with maximum class-label purity and minimum classification error over the samples of the node. (3) Each local classifier is assembled by minimizing the global classification error. We evaluate the method on three well-known challenging datasets: TUD pedestrians, INRIA pedestrians, and UIUC cars. The experiments demonstrate that our method achieves state-of-the-art or competitive performance.