Hi.
I’m finally sharing a Gradio app with my work. It is a model that classifies between the following 8 telecommunication tower parts:
- Base plate
- Grounding bar
- Identification
- Ladder
- Light
- Lightning rod
- Platform
- Transmission lines
Here some example pictures:
You can try the app here:
I worked as a structural engineer for 14 years designing new telecommunication structures and doing reinforcing analysis for existing ones . So I have lots of pictures of towers from all over Venezuela. To give you an idea, between 2015 and 2016 I did the analysis of the following sites.
To create this model, only 478 images for training and 119 for validation were used.
This experiment began in the 2019 edition of the fastai course. To make things easy, I chose parts that were, like, easily distinguishable between them. But I think there would be potential by segmenting parts, or detecting rust, missing bolts. Nowadays inspections are done by drones (at least in the advanced economies), so maybe using some models would help automate or improve inspection and analysis.
Nevertheless, at the time, I was very impressed with the accuracy achieved thanks to transfer learning. Using resnet34 and training for 6 epochs gave me an error rate of 0.091667.
But I also found some “obstacles”:
- I couldn’t make use of my own GPU because it was very hard to install fastai in Windows. So I did the training in Colab, even though using Colab wasn’t officially supported or explained in the docs. Practical Deep Learning for Coders 2019
- Then it was a pain to deploy the model. Although I did set up the front-end and back-end within a Docker container, the UI was so awful and the app was difficult to deploy in Heroku that I didn’t share it here in the forum (I regret that).
Now those things are more accessible. You can train your models in many platforms for free. And there is also WSL2 which allowed me to use my old GTX 1070 GPU! (Thanks to lesson 2 and the help from this forum)
And there is also more accessible options like Gradio and Streamlit to share some great apps without worrying about JavaScript or Docker while starting out.
For this model, using resnet18 for 3 epochs resulted in an error rate of 0.008333.
So, an improvement from 90% to 99% accuracy with half the epochs.
There is a great margin of improvement. I tried some pictures that were misclassified. But I could also use many more pictures to improve the model.
Well, sorry for the long story, I’m happy with the results and grateful with this supporting community.
PD. The tutorial Gradio + HuggingFace Spaces: A Tutorial by @ilovescience was really usefull. Pay special attention to the git-lfs
part.
Thanks a lot.