Comments (11)
@kenji-miyake I think we should add a rule in documentation to not allow binary image contributions.
(I don't know if it's practical to add a CI check for this.)
Maybe we can use this https://github.com/ppremk/lfs-warning to prevent them from being contributed.
from autoware.
I don't know a thing about graphic software, but from a quick google it seems Inkscape has quick auto-vectorization tool:
- Path > Trace Bitmap...
- Tab: Multicolor
- Detection Mode: Color
- Remove Background
Took me 30 seconds (sorry for dark mode users):
Size before: 7MB
Size after: 650KB
I don't know if it is a very clean SVG, in particular text is not stored as text, but it could be a quick and effective way to reduce image size. The better way would be to have access to the original files.
from autoware.
https://github.com/autowarefoundation/autoware.universe/blob/main/planning/behavior_path_planner/image/avoidance/avoidance_design.fig1.drawio.svg
Has no reason to be this large.
I'm not sure, but it might have some meta data for re-editing in draw.io
.
from autoware.
@kenji-miyake I think we should add a rule in documentation to not allow binary image contributions.
@xmfcx I remember you said we can consider utilizing git-lfs
for images.
Did you find any problem with git-lfs
and change your mind?
(I don't know if it's practical to add a CI check for this.)
If we really disallow image files, I think checking on CI is good.
from autoware.
@xmfcx I remember you said we can consider utilizing
git-lfs
for images.
Did you find any problem with git-lfs and change your mind?
We had a discussion with the Autoware Planning & Control team in the WG meeting.
The common agreement was that the draw.io metadata information (the binary blob) in the files are important for the team. We should keep them.
And to allow this, I had 2 solutions:
- Add
git-lfs
support for the image and binary files. (my preference) - Replace the
.svg
files with smaller versions. But collect and host the original.drawio.svg
files in some google drive, have links to them in the documentation. (too complicated and hard to maintain)
@esteve do you think adding git-lfs
tracking to the generic image files in the middle of repository timeline might have any unknown side effects?
I would like to go with this option but we also need to update the documentation, maybe ansible scripts, maybe for certain CI actions (like mk-docs generation) to have this support.
from autoware.
@esteve do you think adding
git-lfs
tracking to the generic image files in the middle of repository timeline might have any unknown side effects?
I don't know of any side effects, but I agree with using git-lfs
for storing the .svg
files.
from autoware.
For example,
Following file:
Has no reason to be this large.
But it has many binary images inside which can be replaced with vector images.
from autoware.
@VRichardJP thanks, I didn't know Inkscape could do it too.
I could get following in Illustrator following https://helpx.adobe.com/illustrator/using/image-trace.html
I'm not sure, but it might have some meta data for re-editing in draw.io
@kenji-miyake it's likely. Because when I opened the file with Illustrator and just saved it back without doing anything, it got reduced to 25KB.
We can still utilize git-lfs, but just for light vector files, it might not be necessary.
from autoware.
@xmfcx By the way, how critical is this issue? Do you have any specific problems caused by the repository size?
from autoware.
By the way, how critical is this issue? Do you have any specific problems caused by the repository size?
I'd say it has normal priority. Keeping repo small in general is a good practice. And earlier we do this, better it is. Because these binary files keep making the .git folder larger and larger with no return.
I've realized this while investigating why the autoware folder was so large. Then realized these images and it'd be a good thing to do if anyone would like to spare some time.
It'd be the best if people who contributed these files put here the lighter versions instead, since we might lose some quality otherwise.
from autoware.
@xmfcx agrees on closing the issue.
from autoware.
Related Issues (20)
- Implementing BEVDet in Autoware HOT 9
- Create Dense Urban ODD Scenarios HOT 3
- Proposal for Integration and Contribution of Ouster Lidar and DURO GNSS to Autoware Repository
- Perception Containerization HOT 2
- Enable 3 lidar AWSIM Labs simulator compatibility
- Test highway localization feasibility of Current Autoware Pipe-Line HOT 34
- Implementing lane detection method for lane level localization purposes HOT 2
- Collect Urban Dataset for Autoware and Autoware Labs HOT 25
- Report results of the weekly scenario tests publicly as dashboard
- Autoware weekly scenario tests are failing. HOT 3
- Docker Image OpenADK with CUDA support has an issue with CUDA installation HOT 2
- Prune and document the docker packages HOT 3
- Migration from autoware_auto_msgs to autoware_msgs
- Enhancing scenario_simulator_v2 to print or visualize parameters/modifiers used for test iterations
- When the display scale is set to 200% the Rviz window always crashes HOT 1
- `docker-build-and-push` should not push an image for every commit to main
- `docker-build-and-push-main` is failing HOT 4
- compare_map_segmentation
- Missing environment variables in devel Docker container HOT 2
- Separation of `autoware_common` to `autoware_cmake`, `autoware_utils` and `autoware_lanelet2_extension` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autoware.