Preparing your AI Model
This guide will help you in structuring your AI Model
Your model should have the following structure:
Input (Directory)
Output (Directory)
requirements.txt (File)
README.md (File)
src (Directory)
src / run.py (File)
stats (Directory)
Input - 'Input' directory contains sample source images / Videos for inference.
Output - 'Output' directory contains sample outputs which were generated by inference on 'Input' directory.
requirements.txt - 'requirements.txt' should list all the python dependencies with versions. You can use: pip freeze > requirements.txt
to generate this file.
README.md - This file tells other people why your project is useful, what they can do with your project, and how they can use it.
src - 'src' directory contains all the source code for I/O, pre-processing and post-processing along with the trained model.
src/run.py - This is the main python file that the user calls. It should be able to take at least 'input' (Input path) and 'output' (Output path) as arguments. Example -
python src/run.py --input Input --output Output
stats - This directory may contain one or more files. Each file stores inference time taken on particular hardware. Example - 'cpu.txt' stores inference time on CPU.
Above mentioned are the necessary files/directories which your model should have. It may contain additional files if your model requires.
Once you have structured your model according to the above template, compress the folder as a zip file.
Last updated