Recent years have witnessed a rapid growth of Artificial Intelligence (AI) in biomedical fields. However, an accurate and secure system for pneumonia detection and diagnosis is urgently needed. We present the optimization and implementation of a collaborative learning algorithm for an AI-Enabled Real-time Biomedical System (AIRBiS), where a convolution neural network is deployed for pneumonia (i.e., COVID-19) image classification. With augmentation optimization, the federated learning (FL) approach achieves a high accuracy of 95.66%, which outperforms the conventional learning approach with an accuracy of 94.08%. Using multiple edge devices also reduces overall training time.