The number of input features of the first linear layer in a “standard” CNN is defined by the flattened activation from the feature extractor (conv-pool layers).
Each image contains 3*224*224=150528 pixels at the beginning. The conv and pooling layers then change the activation shape (spatial and channel-wise) so that the output will have the shape [batch_size, 512, 7, 7]. After flattening this activation, you’ll end up with a tensor of [batch_size, 25088].
Let me know, if you need more information or if I misunderstood your question.