Image classification for heritage structures (TensorFlow) + exploratory analytics and recommendation engine for tourism.
Historical structures preserve cultural heritage and attract tourism. A government agency wants to use machine learning to:
Predict the category (one of 10 classes) of a structure from an image to support automated monitoring.
sparse_categorical_crossentropy.
# CNN architecture
base_model = tf.keras.applications.ResNet50(
input_shape=(224,224,3),
include_top=False,
weights='imagenet' #Initialize the weights (parameters) using the model that was already trained on ImageNet.
)
#Add the layers
model = models.Sequential([
base_model,
layers.GlobalAveragePooling2D(), #Flatten- for transfer we use this layer rather than flat layer
layers.Dense(128, activation='relu'),
layers.Dropout(0.2), # Dropout for regularization
layers.Dense(10, activation='softmax') # 10 classes
])
model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
Validation accuracy > Training accuracy and Validation loss < Training loss, indicating strong generalization. Augmentation increased robustness but made training accuracy lower due to higher data variability. Additional data or longer training could further improve performance.
Perform EDA and build recommenders to help tourists discover places of interest and guide tourism marketing.
| Insight | Summary |
|---|---|
| Top rating age group | Users aged 25–35 provided most ratings |
| Top tourist origin | Bekasi, Jawa Barat |
| Popular cities | Bandung, Jakarta, Yogyakarta City |
| Top category by visits | Amusement Parks |
| Highest-rated category | Nature preserves |
The analytics uncovered clear demographic and location patterns (top cities and categories). The hybrid approach (collaborative + generative) can be used together: collaborative filtering where data overlap exists and GenAI for contextual, category-based suggestions.


