Using Tensorflow for Clean and Messy Room Image Classification with Python
DOI:
https://doi.org/10.22441/collabits.v3i2.27274Keywords:
TensorFlow, Convolutional Neural Network, Image Classification, Python, Data AugmentationAbstract
Image classification is a fundamental computer vision task that can support automated visual monitoring in domestic, educational, and workplace environments. This study develops a transparent baseline pipeline using TensorFlow 2.x, Keras, and Python to distinguish clean and messy room images. The dataset contains 192 training images, with 96 images in each class, and 20 validation images, with 10 images in each class. All images are resized to 150 x 150 pixels and normalized to a 0-1 range. Rotation, horizontal flipping, and shearing are applied only to the training data, while validation images are normalized without random transformation. The sequential convolutional neural network contains four convolution-pooling blocks, a fully connected layer, and a sigmoid output for binary classification. Qualitative testing with two external images produced labels that were consistent with visual observation: the cluttered room was classified as messy and the organized room as clean. These demonstrations confirm that the pipeline operates from image input to class prediction, but they do not establish broad generalization or perfect accuracy. The main contribution is a reproducible small-data workflow that documents dataset distribution, preprocessing, augmentation, model parameters, validation procedures, and prediction thresholds. The study is limited by the small validation set, the absence of a large independent test set, and the lack of direct comparison with pretrained models. Future studies should evaluate transfer learning, larger datasets, repeated trials, and metrics such as precision, recall, F1-score, and confusion matrices.
Downloads
References
[1] TensorFlow, "Image classification," TensorFlow Core Tutorials, updated Apr. 3, 2024.
[2] TensorFlow, "Data augmentation," TensorFlow Core Tutorials, updated Jul. 19, 2024.
[3] TensorFlow, "Transfer learning and fine-tuning," TensorFlow Core Tutorials, updated Aug. 16, 2024.
[4] M. Tan and Q. V. Le, "EfficientNetV2: Smaller models and faster training," in Proceedings of the 38th International Conference on Machine Learning, vol. 139, pp. 10096-10106, 2021.
[5] I. Bello, W. Fedus, X. Du, E. D. Cubuk, A. Srinivas, T.-Y. Lin, J. Shlens, and B. Zoph, "Revisiting ResNets: Improved training and scaling strategies," Advances in Neural Information Processing Systems, vol. 34, pp. 22614-22627, 2021.
[6] Z. Liu, H. Mao, C.-Y. Wu, C. Feichtenhofer, T. Darrell, and S. Xie, "A ConvNet for the 2020s," in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11976-11986, 2022, doi: 10.1109/CVPR52688.2022.01167.
[7] D. Qin et al., "MobileNetV4: Universal models for the mobile ecosystem," in Computer Vision - ECCV 2024, Lecture Notes in Computer Science, vol. 15098, pp. 78-96, 2024, doi: 10.1007/978-3-031-73661-2_5.
[8] Y. Liu, E. Sangineto, W. Bi, N. Sebe, B. Lepri, and M. De Nadai, "Efficient training of visual transformers with small datasets," Advances in Neural Information Processing Systems, vol. 34, pp. 23818-23830, 2021.
[9] TensorFlow, "Image classification with Model Garden," TensorFlow Core, updated Oct. 17, 2023.
[10] G. Ding, "Messy vs Clean Room," Kaggle Dataset, 2019.









