# crowdAI Food Challenge : Baseline This repository contains the details of implementation of the Baseline submission using [Mask RCNN](https://arxiv.org/abs/1703.06870) which obtains a score of `[AP(IoU=0.5)=0.183 ; AR(IoU=0.5)=0.224]` for the [AICrowd Food Challenge](https://www.aicrowd.com/challenges/food-recognition-challenge). # Installation ``` git clone https://gitlab.aicrowd.com/nikhil_rayaprolu/food-recognition/ cd food-recognition # Please ensure that you use python3.6 pip install -r requirements.txt python setup.py install ``` # Notebooks Please follow the instructions on the relevant files for the training, prediction and submissions. * [Training](Train.py) * [Prediction and Submission](eval.py) (_pre-trained weights for baseline submission included_) # How to Submit As noted at https://github.com/AIcrowd/food-recognition-challenge-starter-kit/ this repository contains aicrowd.json and custom changes to Dockerfile ``` # Custom changes for Submission COPY ./requirements.txt . RUN pip install -r requirements.txt --user COPY . . ``` changes to [run.py](run.py#L135) can be seen at line 135, where we call a function from [eval.py](eval.py#L82) . run.py . ``` evaluate(test_images_path, predictions_output_path) ``` Inside the evaluate function in [eval.py](eval.py#L102), we pass the images into the model for detection . eval.py . ``` predoctions = model.detect(images, verbose=0) ``` By writing this code, you are basically allowing AICrowd Auto-Evaluators to pass private test data into your model and detect predictions in runtime for the new data. # Citation ``` @misc{AICrowdFoodChallengeBaseline2018, author = {Nikhil, Rayaprolu}, title = {AICrowd Food Recognition Challenge 2019 : Baseline with Mask RCNN}, year = {2019}, publisher = {Gitlab}, journal = {Gitlab repository}, howpublished = {\url{https://gitlab.aicrowd.com/nikhil_rayaprolu/food-recognition}}, } ``` # Acknowledgements This repository heavily reuses code from the amazing [tensorflow Mask RCNN implementation](https://github.com/matterport/Mask_RCNN) by [@waleedka](https://github.com/waleedka/). Many thanks to all the contributors of that project. You are encouraged to checkout [https://github.com/matterport/Mask_RCNN](https://github.com/matterport/Mask_RCNN) for documentation on many other aspects of this code. # Author Nikhil Rayaprolu [nr178@student.london.ac.uk](nr178@student.london.ac.uk)