Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
fix relative path calculation, ignore vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
fcakyon committed Aug 18, 2020
1 parent 90faafa commit e5c5bc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,6 @@ dmypy.json

# Pyre type checker
.pyre/

#vscode
.vscode
5 changes: 3 additions & 2 deletions midv500/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ def list_annotation_paths_recursively(directory: str, ignore_background_only_one
if intersect_area < 1:
continue

relative_filepath = abs_filepath.split(directory)[-1]
relative_filepath = relative_filepath.replace("\\", "/") # for windows
abs_filepath = abs_filepath.replace("\\", "/") # for windows
relative_filepath = abs_filepath.split(directory)[-1] # get relative path from abs path
relative_filepath = [relative_filepath[1:] if relative_filepath[0] == "/" else relative_filepath]
relative_filepath_list.append(relative_filepath)

number_of_files = len(relative_filepath_list)
Expand Down

0 comments on commit e5c5bc0

Please sign in to comment.