|
| 1 | +## Google Drive |
| 2 | + |
| 3 | +### Prerequisites |
| 4 | +- You must have a Google account |
| 5 | +- Your image files should be stored in a public Google Drive folder |
| 6 | +- You have access to Google Apps Script via https://script.google.com |
| 7 | + |
| 8 | +### Creation Steps |
| 9 | +- Create a Google Apps script project |
| 10 | + - Go to https://script.google.com |
| 11 | + - Click on "New Project" |
| 12 | + - Rename the project name to your desired project name |
| 13 | +- Paste the utility script |
| 14 | + - Replace any existing default code the code from this utility file |
| 15 | +- Replace Placeholder Values |
| 16 | + - Replace 'your_coco_export.json' with your output filename |
| 17 | + - Replace 'your_public_folder_id' with the ID of your Google Drive folder |
| 18 | + |
| 19 | +> The folder ID is the alphanumeric string that appears after "/folders/" in the URL.\ |
| 20 | +> Eg: https://drive.google.com/drive/folders/1prcCevijN5mubTllB2kr5ki1gjh_IO4u?usp=sharing |
| 21 | +
|
| 22 | +### Run the script |
| 23 | + |
| 24 | +- Save the project to Drive using the floppy disk 💾icon |
| 25 | +- Press Run |
| 26 | +- Accept the authorization prompts the first time you run the script |
| 27 | + |
| 28 | +### View COCO JSON Output |
| 29 | +- Go to View > Logs |
| 30 | +- Copy the Google Drive URL where the coco file is created and generated |
| 31 | +- Download the json file |
| 32 | + |
1 | 33 | ## DropBox
|
| 34 | + |
2 | 35 | ### Prerequisites
|
3 | 36 |
|
4 | 37 | - Create account: https://www.dropbox.com/register
|
|
21 | 54 | - Click **Generated access token**
|
22 | 55 | - Install uv on your system: https://docs.astral.sh/uv/getting-started/installation/
|
23 | 56 | - Download the [generate_coco_from_dropbox.py](user_scripts/generate_coco_from_dropbox.py) script
|
24 |
| -- Run the script |
25 |
| - ```bash |
26 |
| - # Help |
27 |
| - uv run generate_coco_dropbox.py --help |
28 |
| - |
29 |
| - # Sample |
30 |
| - uv run generate_coco_dropbox.py "DROPBOX_ACCESS_TOKEN" "FOLDER_PATH_IN_DROPBOX" "DESTINATION_EXPORT_FILE_NAME_IN_DROPBOX" |
31 |
| - |
32 |
| - # Example |
33 |
| - uv run generate_coco_dropbox.py sl.yourAccessTokenHere “/COCO TEST” “coco_export.json” |
34 |
| - ``` |
35 |
| -- Download the coco_export.json from the dropbox |
| 57 | + |
| 58 | +### Run the script |
| 59 | +```bash |
| 60 | +# Help |
| 61 | +uv run generate_coco_dropbox.py --help |
| 62 | + |
| 63 | +# Sample |
| 64 | +uv run generate_coco_dropbox.py "DROPBOX_ACCESS_TOKEN" "FOLDER_PATH_IN_DROPBOX" "DESTINATION_EXPORT_FILE_NAME_IN_DROPBOX" |
| 65 | + |
| 66 | +# Example |
| 67 | +uv run generate_coco_dropbox.py sl.yourAccessTokenHere “/COCO TEST” “coco_export.json” |
| 68 | +``` |
| 69 | + |
| 70 | +Download the coco_export.json from the dropbox |
0 commit comments