Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing dependencies and some small suggestions #6

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# pip3 install -U -r requirements.txt
numpy
tqdm
tqdm
pandas
pillow
opencv-python
10 changes: 9 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import cv2
import pandas as pd
from PIL import Image
import argparse

from utils import *

Expand Down Expand Up @@ -301,6 +302,10 @@ def convert_ath_json(json_dir): # dir contains json annotations and images
def convert_coco_json(json_dir='../coco/annotations/'):
dir = make_folders(path='out/') # output directory
jsons = glob.glob(json_dir + '*.json')
if len(jsons) == 0:
print(f"Warning: did not find any json files in {json_dir}")
exit(1)

coco80 = coco91_to_coco80_class()

# Import json
Expand Down Expand Up @@ -333,7 +338,10 @@ def convert_coco_json(json_dir='../coco/annotations/'):


if __name__ == '__main__':
source = 'coco'
parser = argparse.ArgumentParser(description='Convert dataset to darknet format')
parser.add_argument('--source', metavar='N', type=str, default='coco', help='format of source dataset')
args = parser.parse_args()
source = args.source

if source is 'labelbox': # Labelbox https://labelbox.com/
convert_labelbox_json(name='supermarket2',
Expand Down