{"id":20924566,"url":"https://github.com/alkasaliss/pastai","last_synced_at":"2026-04-13T12:01:29.413Z","repository":{"id":97738829,"uuid":"371511186","full_name":"AlkaSaliss/Pastai","owner":"AlkaSaliss","description":"Watermelon fruits detection using deep learning. ","archived":false,"fork":false,"pushed_at":"2021-05-28T20:59:21.000Z","size":64486,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-27T22:44:07.517Z","etag":null,"topics":["agriculture-data","agrotech","computer-vision","cvat","machine-learning","pytorch","yolov5"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlkaSaliss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-05-27T21:43:55.000Z","updated_at":"2022-05-11T12:20:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa80694d-8616-4736-9d13-a30920398cc2","html_url":"https://github.com/AlkaSaliss/Pastai","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"e56e0959de660a27e0497d741c4c8476ea5febe9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AlkaSaliss/Pastai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlkaSaliss%2FPastai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlkaSaliss%2FPastai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlkaSaliss%2FPastai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlkaSaliss%2FPastai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlkaSaliss","download_url":"https://codeload.github.com/AlkaSaliss/Pastai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlkaSaliss%2FPastai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agriculture-data","agrotech","computer-vision","cvat","machine-learning","pytorch","yolov5"],"created_at":"2024-11-18T20:23:33.030Z","updated_at":"2026-04-13T12:01:29.391Z","avatar_url":"https://github.com/AlkaSaliss.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"**True story!**\n\nA friend of mine (let's call him Carmelo, coz it sounds like watermelon) is ruling a small garden with watermelon plants (digression: I love eating watermelon 😸). However, it wouldn't be a good scenario if everything was oki koki :\n\n* Watering and putting fertilizer is inefficient, because it doesn't target the right places where water and fertilizer are needed, and these resources are expensive \n* In early stage, the fruits are vulnerable to insects attacks :\u003cbr\u003e \u003cimg src=\"https://github.com/AlkaSaliss/Pastai/raw/master/src/insect_attack.jpeg\" width=\"200\" height=\"200\" style=\"display: block; margin-left: auto; margin-right: auto;\"/\u003e \n* When the fruits reached maturity, they receive the visit of unexpected watermelon lovers, the crows, see results of their lovely visits :\u003cbr\u003e\u003cbr\u003e\u003cimg src=\"https://github.com/AlkaSaliss/Pastai/raw/master/src/crows.jpeg\" width=\"150\" height=\"200\" style=\"display: block; margin-left: auto; margin-right: auto;\"/\u003e \n\n\nI thought for a while and came with (the not so special) idea that using machine learning + IoT can help in most of the above problems. For example an object detection computer vision model can help in :\n\n* More effectively target areas that need water/fertilizer\n* Detect/count attacked fruits\n* Detect presence of attackers and ring the alarm bell \n* Count/estimate number of fruit in a given area\n* ...\n\nFirst step in data science project is problem definition. Here I wanted to start simple and build a simple app (web, mobile ? I dunno yet ¯\\\\_(ツ)_/¯) around the watermelon detection in the wild.\nAfter problem definition, next logical step is to acquire data. To spice things up, I decided to create and label a small dataset. After all:\u003cbr\u003e\u003cbr\u003e\n\u003cimg src=\"https://github.com/AlkaSaliss/Pastai/raw/master/src/drake.jpg\" style=\"display: block; margin-left: auto; margin-right: auto;\" width=\"150\" height=\"200\"/\u003e\n\nSo, Carmelo (remember him ?) recorded a short video of the plants, of about two and half minutes. After a little investigation about opensource image labelling tools, I found [CVAT](https://github.com/openvinotoolkit/cvat), a tool by Intel, to be the right one for me in terms of :\n\n* easy to install: through simple a docker-compose service\n* intuitive : it offers a simple web interface for labelling and also for labellers accounts administation\n* functionalities : the main ones used in computer vision such as segmentation masks, key points, bounding boxes, ...\n\nAfter about an equivalent of a day of working, I managed ot label around 4.7K images with bounding boxes : \u003cbr\u003e\u003cbr\u003e\n\u003cimg src=\"https://github.com/AlkaSaliss/Pastai/raw/master/src/labelling.gif\" style=\"display: block; margin-left: auto; margin-right: auto;\" width=\"512\" height=\"256\"/\u003e\n\n\u003e Labelling is an exhausting, task, and I needed to go back to some images multiple times to adjust the boxes. \n\nData being created, I searched for a good object detection model that offers a good trade-off between accuracy and speed, as I may want to deploy the model on mobile/edge devices later.  [Yolo V5](https://github.com/ultralytics/yolov5) is one of the best in this area, so I sticked with it. \n\nCheck this [Colab notebook](https://colab.research.google.com/github/AlkaSaliss/Pastai/blob/master/notebooks/YOLO_v5_training.ipynb) to see how to train diffent, Yolo v5 models end-to-end, from data download until model evaluation and conversion.\n\nThe trained model is deployed on streamlit and can be accessed through [this link](https://share.streamlit.io/alkasaliss/pastai/src/pastai_app.py)\n\nNext steps :\n\n\n* Label new data to:\n    * detect attacked watermelon \n    * create a segmentation map around the attacked area\n    * count number of healthy/attacked fruits in a given field area\n* Find a way to make the models useful for our friend Carmelo, for example by embedding the app on mobile/Raspberry Pi camera, ...","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falkasaliss%2Fpastai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falkasaliss%2Fpastai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falkasaliss%2Fpastai/lists"}